This trigger doesn't work.... No idea why

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
Code:
ThunderCaller
    Events
        Unit - A unit Is attacked
    Conditions
        ((Attacking unit) has an item of type ThunderCaller) Equal to True
    Actions
        Custom script:   local location AttackPos
        Set AttackItem = (Item carried by (Attacked unit) of type ThunderCaller)
        Set AttackPos = (Position of (Attacked unit))
        Item - Set charges remaining in AttackItem to ((Charges remaining in AttackItem) + 1)
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Charges remaining in AttackItem) Greater than or equal to 10
            Then - Actions
                Unit - Create 1 Dummy Caster for (Owner of (Attacked unit)) at AttackPos facing Default building facing degrees
                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning (Attacked unit)
                Item - Set charges remaining in AttackItem to 0
            Else - Actions
                Do nothing



the charges don't stack so it seems like it doesn't even fire at all
any ideas?
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
is that even an option?

I'll try "custom value" instead
I was hoping for an easy way for players to see when the next lightning attack would come

does custom value start as 0?
 

0zaru

Learning vJASS ;)
Reaction score
60
Well.. this thing has som,e bugs...

it must be local location udg_AttackPos first than nothing..

Check if the item can have charges, or maybe use an integer to count like
Code:
set integer= integer +1

if integer greater than 10 then

<actions..>

Also how a unit owned by attacked unit will shoot to attacked unit.... is that what you wanted ? if it is then check if you can hit allys in the ability

Code:
                Unit - Create 1 Dummy Caster for [COLOR="Red"](Owner of (Attacked unit))[/COLOR] at AttackPos facing Default building facing degrees
                Unit - Add a 3.00 second Generic expiration timer to (Last created unit)
                Unit - Order (Last created unit) to Orc Far Seer - Chain Lightning [COLOR="Red"](Attacked unit)[/COLOR]
Also you need to remove your variable

call RemoveLocation(udg_AttackPos)
 

xxyourdeadxx

New Member
Reaction score
11
Object editor - items - thundercaller - Stats - Stock Maximum : However many you want. if infinite just put 10000000000000000000 lol
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
xxyourdeadxx; said:
Object editor - items - thundercaller - Stats - Stock Maximum : However many you want. if infinite just put lol

Thought that was just for stores

I think ozaru got it with the "allies not able to attack"
 

esb

Because none of us are as cruel as all of us.
Reaction score
329
Stock maximum is for stores too (I think) but I know for sure it is the amount you are allowed to have in your inventory, before having to use another slot. So if Mana Potions have a stock maximum of 10, you can have 1 - 10. If you want more than 10, you will need 2 slots, 10 each.
 
H

HeroSpawn

Guest
Okay is the Dummy Caster a real command / unit? If not that could be a problem, but I really don't do much custom trigger editting :D So don't start laughing at me if I am wrong :D
 

Knocksious

Sweet, I got 2 little green bars!
Reaction score
46
well, I MADE it a unit. At any rate, the problem is solved, it was 2 cases of using "Attacked Unit" as opposed to "Attacking Unit"
 

Exide

I am amazingly focused right now!
Reaction score
448
I felt I needed to point this out, as AceHart always says: You can remove this:

Code:
            Else - Actions
                [B]Do nothing[/B]

The 'Do nothing' -part, since the trigger won't be doing anything anyway. :p
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top