- Joined
- Aug 8, 2012
- Messages
- 154
Hey there!
So this is my trigger:
My problem is that the last 'Unpause' for 'Target unit of ability being cast' does not work, nor did any special effects I placed at the point of the target unit (I took those out). For some reason, the first pause does, but by the time it gets to the unpausing, the trigger has forgotten what unit 'target unit of ability being cast' is. I cannot just save the unit as a variable because lots of units could be doing this ability at the same time (don't even ask, I know the trigger/ability looks a bit weird :L).
So say I saved the target unit as a variable, 'Breedee' and used that in this trigger. If this trigger ran again at the same time, surely the 'Breedee' variable would only apply to the latest running of the trigger, so any of them that started before would not have the 'Breedee' variable saved to them, and all the new units spawned would appear at the last one to finish breeding, and the first 'Breedee's would be stuck as paused units. Is that right?
And yes, I know this trigger leaks like the titanic, it's only a hypothetical thing I whipped up for my map, if it actually worked I would clean it up after, but right now I am more focused on the actual function of the trigger being successful! xD
So this is my trigger:
-
Breeding
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to Breed
-
Actions
- Set Breedchance = (Random integer number between 1 and 10)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Triggering unit)) Equal to (Unit-type of (Target unit of ability being cast))
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Breedchance Greater than or equal to 6
-
Then - Actions
- Unit - Pause (Triggering unit)
- Unit - Pause (Target unit of ability being cast)
- Unit - Make (Target unit of ability being cast) face (Facing of (Triggering unit)) over 1.00 seconds
- Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
- Animation - Play (Triggering unit)'s attack animation
- Wait 2.00 seconds
- Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
- Animation - Play (Triggering unit)'s attack animation
- Wait 2.00 seconds
- Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
- Animation - Play (Triggering unit)'s attack animation
- Wait 2.00 seconds
- Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
- Animation - Play (Triggering unit)'s attack animation
- Wait 2.00 seconds
- Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
- Animation - Play (Triggering unit)'s attack animation
- Wait 2.00 seconds
- Unit - Unpause (Target unit of ability being cast)
- Unit - Unpause (Triggering unit)
- Special Effect - Create a special effect at (Position of (Triggering unit)) using Abilities\Spells\Orc\Devour\DevourEffectArt.mdl
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cff32cd32Breeding ...
- Unit - Create 1 (Unit-type of (Triggering unit)) for (Owner of (Triggering unit)) at (Position of (Triggering unit)) facing Default building facing degrees
-
Else - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cffff0000Breeding ...
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Game - Display to (Player group((Owner of (Triggering unit)))) the text: |cffff0000Breeding ...
-
If - Conditions
-
Events
So say I saved the target unit as a variable, 'Breedee' and used that in this trigger. If this trigger ran again at the same time, surely the 'Breedee' variable would only apply to the latest running of the trigger, so any of them that started before would not have the 'Breedee' variable saved to them, and all the new units spawned would appear at the last one to finish breeding, and the first 'Breedee's would be stuck as paused units. Is that right?
And yes, I know this trigger leaks like the titanic, it's only a hypothetical thing I whipped up for my map, if it actually worked I would clean it up after, but right now I am more focused on the actual function of the trigger being successful! xD