• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Illusion problem

Status
Not open for further replies.
You just need to give a signal when one of illusion abilities are used.

  • 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
 
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
  • Selection - Select Triggering Unit for Player 1 (Red)
and set selectIllusion = false. That way, when the next illusion is created, selectIllusion is already false and the trigger will not run.

There you go, one of the illusion created is selected by player 1.
 
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
  • Selection - Select Triggering Unit for Player 1 (Red)
and set selectIllusion = false. That way, when the next illusion is created, selectIllusion is already false and the trigger will not run.

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
 
Status
Not open for further replies.
Back
Top