• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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