- Joined
- May 11, 2012
- Messages
- 2,108
How do I (when I use a spell creates illusion) select the specific illusion without adding buff?
Or do I have to use spell which creates buff.
Or do I have to use spell which creates buff.
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Events

Unit - a unit enters playable map area[
Conditions
Is unit illusion
Doesnot work?
Events
Unit - a unit enters playable map area[
Conditions
Is unit illusion
Same thing. It would still cause me problems. If only there was a way to select specific illusion...
Detect

Events


Unit - A unit Starts the effect of an ability

Conditions


(Unit-type of (Triggering unit)) Equal to YOUR_HERO

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to ILUS_ABILITY_1



Then - Actions




Set IllusionAbility = 1



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




(Ability being cast) Equal to ILUS_ABILITY_2



Then - Actions




Set IllusionAbility = 2



Else - Actions
Spawn

Events


Unit - A unit Spawns a summoned unit

Conditions


(Unit-type of (Summoning unit)) Equal to YOUR_HERO


((Summoned unit) is an illusion) Equal to True

Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




IllusionAbility Equal to 1



Then - Actions




-------- Illusion is created via first ability --------



Else - Actions


If (All Conditions are True) then do (Then Actions) else do (Else Actions)



If - Conditions




IllusionAbility Equal to 2



Then - Actions




-------- Illusion is created via second ability --------



Else - Actions


-------- It is good to reset this value for some cases.---


Set IllusionAbility = 0
Selection - Select Triggering Unit for Player 1 (Red)
From what I understand, you want to select a certain illusion after a unit has used an illusion ability when there are more than 1 illusion is created. If that's the case, try this. (in this example im gonna make player 1 selects the illusion)
1. You need a boolean variable (e.g. name selectIllusion).
2. When a unit uses the illusion ability, set the boolean variable to true (selectIllusion = true)
3. When a unit enters playable map area and is an illusion and selectIllusion is equal to true, then use
and set selectIllusion = false. That way, when the next illusion is created, selectIllusion is already false and the trigger will not run.
Selection - Select Triggering Unit for Player 1 (Red)
There you go, one of the illusion created is selected by player 1.
Wow, this actually makes sense!
I might apply this thing after all, since this way it won't collide with another illusion creating spell.
Thanks, Shadow Flux
