i need to solve this problem. i create 2 ravens, and i need 1 of them to cast hsm when he see one unit.
i want to make this in a clean and nice way, without workarounds.
i cant find how to instruct AI to do this.. so i found a trigger
Events:
" Unit - Any Unit Enters a distance of 3.0 from (Unit 1 from ravens) "
where ravens is a unit group containing the 2 ravens..
but this trigger never triggers.. i suppose because at start ravens = 0, and then i create 2 ravens and assign them to the group, but the trigger already "registered" himself with ravens = 0, and the variable is not update and the trigger always run with raven = 0.
Events
Unit - Any Unit Enters a distance of 3.0 from (Unit 1 from ravens)
Local Variables
Conditions
Actions
Debug - Display "triggers" as debug output using Type 1, and Do display it in the game window
Unit - Order (Unit 1 from ravens) to (Raven - Raven - Seeker Missile (Triggering unit)) (Replace Existing Orders)
i haev this trigger, ravens is a unit group (i create 2 ravens and assign them to this unit group)
this will never triggers.. dont know why.
I don't know if you really want to use triggers, but it can be done simply with behaviors and effects.
First, create an effect (Issue Order). Set the issued order to the ability you want to use.
Then, create another effect (Search Area). Set the area to something high, like 10 or 15. in the search filters, set Visible to Required. finally, in the search area, set the effect to your issue order you just created.
finally, create a behavior (Buff) with a duration of -1, a period of 0.0001 and the effect will be your Search effect you created. Add the behavior to your unit and it should cast the ability to the units that come in his "sight range"
There may be some field I didn't mentioned, check my map to be sure :P
i need to solve this problem. i create 2 ravens, and i need 1 of them to cast hsm when he see one unit.
i want to make this in a clean and nice way, without workarounds. i cant find how to instruct AI to do this.. so i found a trigger
Events: " Unit - Any Unit Enters a distance of 3.0 from (Unit 1 from ravens) "
where ravens is a unit group containing the 2 ravens..
but this trigger never triggers.. i suppose because at start ravens = 0, and then i create 2 ravens and assign them to the group, but the trigger already "registered" himself with ravens = 0, and the variable is not update and the trigger always run with raven = 0.
you could look at changling it does some thing like that...
can you be more specific pls ?
try placing a chanling on a map and a enemy unit a bit away then move until the changling can see the other unit.
@Petoj87: Go
Events Unit - Any Unit Enters a distance of 3.0 from (Unit 1 from ravens) Local Variables Conditions Actions Debug - Display "triggers" as debug output using Type 1, and Do display it in the game window Unit - Order (Unit 1 from ravens) to (Raven - Raven - Seeker Missile (Triggering unit)) (Replace Existing Orders)
i haev this trigger, ravens is a unit group (i create 2 ravens and assign them to this unit group) this will never triggers.. dont know why.
I don't know if you really want to use triggers, but it can be done simply with behaviors and effects.
First, create an effect (Issue Order). Set the issued order to the ability you want to use. Then, create another effect (Search Area). Set the area to something high, like 10 or 15. in the search filters, set Visible to Required. finally, in the search area, set the effect to your issue order you just created.
finally, create a behavior (Buff) with a duration of -1, a period of 0.0001 and the effect will be your Search effect you created. Add the behavior to your unit and it should cast the ability to the units that come in his "sight range"
There may be some field I didn't mentioned, check my map to be sure :P
Ragoulette (learning english :S)
i really need triggers to be honest :(
and i need to create dynamically a unit (in this case a raven) and cast when something approaches..
Use ragoulette's solution but just create the raven when you want it. It will cast when something approaches, if I understood him properly.
@ultrakorne: Go
this is pretty easy:
my sentry casts his guardien shield as soon as an enemy approaches