• 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.

Triggering Spell and Variable with array size

Status
Not open for further replies.
Level 7
Joined
Mar 5, 2009
Messages
254
Hello all,i want to make spell active evasion 95% for 5 seconds.I found a way to trigger it but im not sure if it's good cuz im not good at using variables with array size.I decided to create 9 Triggers( 1 for each player,9 players all)

Trigger 1 :
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Owner of (Casting unit)) Equal to Player 1 (Red)
    • (Ability being cast) Equal to Watry Minion
  • Actions
    • Set WindsBlessingCaster[1] = (Casting unit)
    • Unit - Add Evasion22 to WindsBlessingCaster[1]
    • Wait 5.00 seconds
    • Unit - Remove Evasion22 from WindsBlessingCaster[1]
In each other trigger ill use array [2] [3] [4] [5] etc. for the casting unit.Is it alright if i trigger it like that ?
 
Level 7
Joined
Mar 5, 2009
Messages
254
ohh thanks,should it be like this ?
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Watry Minion
  • Actions
    • Set WindsBlessingCaster[(Player number of (Triggering player))] = (Triggering unit)
    • Unit - Add Evasion22 to WindsBlessingCaster[(Player number of (Triggering player))]
    • Wait 5.00 seconds
    • Unit - Remove Evasion22 from WindsBlessingCaster[(Player number of (Triggering player))]

And how much array size i should use for the variable ?
 
Status
Not open for further replies.
Top