Current Order

skyblader

You're living only because it's illegal killing.
Reaction score
159
Is there a way to detect current order, and the target unit of the order?
 

vypur85

Hibernate
Reaction score
803
Just... show current order of unit? Periodic, or anything at all, depending on what you're doing.

Don't think you can detect the target unit of being ordered to. It only detects when the event fires. If that's the case, 'Target unit of issued order' is what you're looking for. Then again, I believe you already know this. So it falls back to the former answer.
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Wouldn't the current order of unit be "attack", if let's say I was trying to detect that? I need the unit.. What I'm actually doing is a spell that deals damage to a unit every second for a duration. If the unit is attacking a specific unit, it will not take the damage. So you get why I'm trying to find the order? :p

Code:
BR Casted
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Bloodrush 
    Actions
        Set BRCaster[GTS_GetIndex] = (Triggering unit)
        Set BRTarget[GTS_GetIndex] = (Target unit of ability being cast)
        Set GTS_StoreTrigger = BR Damage <gen>
        Set BRDuration[GTS_GetIndex] = 15.00
        Countdown Timer - Start GTS_NewTimer as a Repeating timer that will expire in 1.00 seconds
        Trigger - Run GTS Store <gen> (ignoring conditions)

Code:
BR Damage
    Events
    Conditions
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Current order of BRTarget[GTS_GetIndex]) Not equal to (Order(attack))
            Then - Actions
                Unit - Cause BRCaster[GTS_GetIndex] to damage BRTarget[GTS_GetIndex], dealing (20.00 + (10.00 x (Real((Level of Bloodrush  for BRCaster[GTS_GetIndex]))))) damage of attack type Spells and damage type Normal
                Special Effect - Create a special effect attached to the chest of BRTarget[GTS_GetIndex] using Objects\Spawnmodels\Critters\Albatross\CritterBloodAlbatross.mdl
                Special Effect - Destroy (Last created special effect)
            Else - Actions
        Set BRDuration[GTS_GetIndex] = (BRDuration[GTS_GetIndex] - 1.00)

Anyway these are my triggers and I'd like to avoid using hashtables as much as possible. (Creating a hashtable just to save 1 value..) I'm using Weep's GTS as well.
 

vypur85

Hibernate
Reaction score
803
This is a little bit complicated. I'm not too sure of a clear cut way myself.

Workaround:
When the unit is attacking the 'special unit', create a dummy and cast a buff spell to the attacking unit. The buff will probably last for like 2 seconds.

So, for your damage spell, check if the unit has this buff, don't damage the unit, else damage.
To prevent lag, always use a singular dummy to cast the same buff over and over again.


> Creating a hashtable just to save 1 value
If you use hashtable wisely, you'd only need very few for your entire map. Perhaps about 20. [del]In fact, 1 is possible but it makes things a lot more complicated, and confusing.[/del] Don't mark my words on this, I'm still newbie in Hashtables. (Just some common sense in me).
 

skyblader

You're living only because it's illegal killing.
Reaction score
159
Hmm.. Why didn't I think of that :p Thanks.

Actually I'm not making a map, more of just making spells for myself, for others and stuff.
 
General chit-chat
Help Users

      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