I had a (very rough) triggered spell[1], which caused the caster to fire a "ki ball" towards the area of the ability which it was based upon. The ball would then be destroyed if it came within 50.00 of any unit, and also deal damage to them. I had this working to a satisfactory level and was about to neaten it up when i stumbled upon a problem;
The variables I use in the triggers do not allow Mulit-Unit-Instancing, I spent the next hour researching MUI, and managed to apply it successfully[2]. However the tutorial read that you may not use the local variable in a "pick every unit" action, which my spell contains;
-Are there any loopholes or techniques I can use to make my spell MUI?
Any help will be greatly appreciated.
[1]Ki Ball Trigger 1
[2] MUI Test - this worked successfully, with 5 footmen being created and destroyed in the correct order and completely.
~Tyross
The variables I use in the triggers do not allow Mulit-Unit-Instancing, I spent the next hour researching MUI, and managed to apply it successfully[2]. However the tutorial read that you may not use the local variable in a "pick every unit" action, which my spell contains;
-Are there any loopholes or techniques I can use to make my spell MUI?
Any help will be greatly appreciated.
[1]Ki Ball Trigger 1
- Events
- Unit - Unit begins casting a spell
- Conditions
- (Abilitiy Being Cast) Equal to Ki Ball (Neutral Hostile)
- Actions
- Unit - Create 1 Ki Ball for (Owner of (Casting unit)) at (Position of (Casting unit)) facing Default building facing degrees
- Set Combatant1KiBall[1] = (Last created unit)
- Unit - Add a 5.00 second Generic expiration timer to Combatant1KiBall[1]
- Unit - Order Combatant1KiBall[1] to Move To (Target point of ability being cast)
- Events
- Time - Every 0.50 seconds of game time
- Conditions
- Actions
-
Unit Group - Pick every unit in (Units within 50.00 of (Position of Combatant1KiBall[1])) and do (Actions)
-
Loop - Actions
- Unit - Cause Combatant1KiBall[1] to damage (Picked unit), dealing 50.00 damage of attack type Spells and damage type Universal
- Unit - Kill Combatant1KiBall[1]
- Special Effect - Create a special effect at (Position of Combatant1KiBall[1]) using Objects\Spawnmodels\Human\HCancelDeath\HCancelDeath.mdl
-
Loop - Actions
[2] MUI Test - this worked successfully, with 5 footmen being created and destroyed in the correct order and completely.
- Events
- Player - Player 1 (Red) types a chat message containing fire as An exact match
- Conditions
- Actions
- Custom script: local unit udg_muitest
- Unit - Create 1 Footman for Player 1 (Red) at (Random point in (Playable map area)) facing Default building facing degrees
- Set muitest = (Last created unit)
- Wait 10.00 seconds
- Unit - Kill muitest
~Tyross