- Joined
- Aug 3, 2012
- Messages
- 19
Title says it all can someone post a trigger on how to do this?
Spartipilo said:Some orders aren't on the list, and have to be ordered with some custom script.
Can you guys post a trigger example? The ability I want to activate is enrage...
Thanks for the help guys +Rep to all and I found an ability that does exactly what I want... bloodlust so is all good now and this is how I ended up setting it up...
EDIT: failed attempt im just going to make another unit that attacks and runs faster I guess...
- Zombies use enrage ability
- Events
- Time - Every 10.00 seconds of game time
- Conditions
- Actions
- Unit Group - Pick every unit in (Units of type Zombie) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P1) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P2) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P3) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P4) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P5) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P6) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P7) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
- Unit Group - Pick every unit in (Units of type Zombie P8) and do (Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust)
Just example:
Then:
- Events
- Map Initialization
- Conditions
- Actions
- Set Zombie[1] = Zombie P1
- Set Zombie[2] = Zombie P2
- Set Zombie[3] = Zombie P3
- ---- until ----
- Set Zombie[8] = Zombie P8
- Set Zombie[9] = Zombie
(There, simpler clicking, doesn't it?)
- Events
- Time - Every 10.00 seconds of game time
- Conditions
- Actions
- Loop - For each Integer A from 1 to 9 do actions
- Actions
- Unit Group - Pick every unit in (Units of type Zombie[Integer A]) and do actions
- Unit - Order (Picked unit) to Orc Shaman - Activate Bloodlust
Yea why not just use arrays as well? Much simpler that way you could loop it.
To do this, go the variable editor and select "Array" and select a size (if you have 8 players, select 8). Then you can just go from there.
lol, you maybe dont know but Jass arrays have ever 8192 indexes, the value in box is just to let you hope
to prove this, go and make unit array of size one and the aet unit[0] go somrthing and unit[1] to something else and then for instance kill both of them, both will be killed
using arrays while having 8 groups leave you with 8184 empty groups and technically looping trough 8 array values is the same as having 8 values in row
you can actually use only one unit group for this whole or just add before every unit group custom script set bj_wantDestroyGroup = true