Order unit to...

SpyDaniel

New Member
Reaction score
0
I have this trigger setup, but the unit which is attacked will not cast the ability on itself. The ability is a copy which requires no mana or tech requirements.

Code:
Rabies Dog effect
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Rabies Dog
    Actions
        Unit - Add Bloodlust  to (Attacked unit)
        Wait 1.00 seconds
        Unit - Order (Attacked unit) to Orc Shaman - Bloodlust (Ordered unit)
 

Solu9

You can change this now in User CP.
Reaction score
216
Unit - Order (Attacked unit) to Orc Shaman - Bloodlust (attacked unit)
 

SpyDaniel

New Member
Reaction score
0
I tried that also, but the unit never cast the ability. Also, what if I want the unit to cast an ability that isn't listed? As in Berzerk?
 

Solu9

You can change this now in User CP.
Reaction score
216
Alright I don't actually know why that trigger of yours doesn't work now.
But you can use the creep ability frenzy instead of bloodlust.
That leads to you question above "how to cast an ability that is not listed". You simple use "Unit - issue unit order with no target" (this is for instant cast abilities mostly).
 

SpyDaniel

New Member
Reaction score
0
Code:
Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Rabies Dog
    Actions
        Unit - Add Berserk to (Attacked unit)
        Unit - Order (Attacked unit) to Orc Troll Berserker - Berserk
        Wait 2.50 seconds
        Unit - Remove All buffs from (Attacked unit)
        Unit - Remove Berserk from (Attacked unit)

Now works perfectly, thanks for your help once again :D
 

Solu9

You can change this now in User CP.
Reaction score
216
Great. However you need to know that the wait in the trigger will mess up if you have more than one Rabies Dog and/or if it gets hit multiple times before the wait finishes.

Waits in triggers are usually a no no.

If two Rabies Dogs are hit within the wait time the second Rabies Dog will have its buff removed at the same time of the first Rabies Dog.

If you have one Rabies Dog and it is hit two times in a row the buff will not prolong the effect. The second hit will lose it's buff at the same time as the first hit's buff. Like the example above.
 

SpyDaniel

New Member
Reaction score
0
I had it setup like so, at first:

Code:
Untitled Trigger 001
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Rabies Dog
    Actions
        Unit - Add Berserk to (Attacked unit)
        Unit - Order (Attacked unit) to Orc Troll Berserker - Berserk

But it only buffed the unit once and never triggered again. Should I have added a remove action for the ability after casting berserk?
 

Solu9

You can change this now in User CP.
Reaction score
216
First check if the ability has a cooldown, mana cost or other requirements preventing it being cast again.
 

SpyDaniel

New Member
Reaction score
0
It had a 30 second cooldown, which is why it wasn't casting it again within the time it was being attacked by the rabies dog. Changed it to 4 seconds cool down and 4 seconds duration.
 

SpyDaniel

New Member
Reaction score
0
Another problem I'm having is with this:

Code:
Sheep effect
    Events
        Unit - A unit Is attacked
    Conditions
        (Unit-type of (Attacking unit)) Equal to Sheep
    Actions
        Unit - Create 1 Sheep for Neutral Hostile at ((Position of (Attacked unit)) offset by (0.00, 0.00)) facing (Random real number between 0.00 and 360.00) degrees
        Wait 3.00 seconds
        Unit - Kill (Last created unit)

Works fine if I have one Tower (Sheep), but if I have more than one, it bugs out and not all of the created sheep are killed 3 seconds after being created.
 

Solu9

You can change this now in User CP.
Reaction score
216
First off. Leave the facing degree as default instead of setting it to a random number between 0 and 360. Default does the same thing.

Secondly read my third reply again ;)
 

SpyDaniel

New Member
Reaction score
0
If I take the wait out though, the sheep wont show up and it will just cause the AOE ability on death. How can I cause it to die after a certain amount of time without using wait?
 

Solu9

You can change this now in User CP.
Reaction score
216
You want the sheep to die 3 seconds after it has been created. Then add and expiration timer to it. Found under "unit" under action.

Your trigger is also leaking a point. You need to make a point-variable and set it in the beginning of your actions. In the end of your actions you have to remove the point again or the game will keep track of that specific point.

Read this tutorial: http://world-editor-tutorials.thehelper.net/cat_usersubmit.php?view=27219
 

NeosDany

Member
Reaction score
1
For the remove buff part you can create a dummy unit with a special skill based on chainlighting that must do 0, 99999 range, only 1 objetive, not bouncing, no effects, target ally and player controled units and 3 SECONDS CASTING TIME.
Then when you cast the skill "order attacked unit to ..." create the dummy unit in the "temppoint" a custom variable created in the place the unit is attacked and uses the skill, then add the "chainlighting" dummy skill we created and order last created to use it on the attacked unit, so you do another trigger when that skill is used remove the specific buff you want, also add only 4 seconds to the dummy so when it does his job or not if the unit is dead before the buff goes off, then the dummy still dies.
To clear the sheep only add expiration time. Search in unit closerby to "pause unit".
 

afisakov

You can change this now in User CP.
Reaction score
37
What exactly is a dummy unit/ability?
A dummy unit is one created for the sole purpose of casting a certain spell, and then removed again. Generally lacks a model file or has one that doesn't resemble a unit and features no attack, the locust ability, and is invulnerable to ensure it does not attack or get attacked.

A dummy ability is either the ability used by the dummy unit (often added to unit via same rigger that created him and has 0 mana cost) or can sometimes be used to refer to abilities that have no object editor effect (0 damage, no meaningful buff or stun) and exist just to activate a trigger that does the real ability effect.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
use triggering unit, it isn't lost after a wait.
 

HellHeaven

New Member
Reaction score
0
Triggering unit won't work here because SpyDaniel does not want to kill the triggering unit. SpyDaniel, you can make those triggers of yours work for multiple units without bugs by using an unit indexer.
 

Dameon

"All the power in the world resides in the eyes"
Reaction score
127
?? what you talking about?? I was referring to the first post and attacked unit being changed.
 

HellHeaven

New Member
Reaction score
0
Do you mean the attacking unit? If you referring to attacked unit, then triggering unit won't work either.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top