Hello, this trigger works almost correctly except for the wait funtion, if the integer number equals to 1 two times in a row the second wait gets over written, how do i make this function properly?
NOTE: This is NOT supposed to work on multiple units. But do i still need to make it MUI?
NOTE: This is NOT supposed to work on multiple units. But do i still need to make it MUI?
-
Moraia Attacking
-
Events
- Unit - A unit Is attacked
-
Conditions
- (Unit-type of (Attacking unit)) Equal to Moraia
-
Actions
- Set VariableSet MoraiaAA_Caster = (Attacking unit)
- Set VariableSet MoraiaAA_Target = (Attacked unit)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Random integer number between 1 and 2) Equal to 1
-
Then - Actions
- Animation - Play MoraiaAA_Caster's Spell Throw animation
- Set VariableSet MoraiaAA_Point = (Position of MoraiaAA_Target)
- Set VariableSet MoraiaAA_SPXPoint = (Position of MoraiaAA_Target)
- Set VariableSet MoraiaAA_Group = (Units within 300.00 of MoraiaAA_Point.)
- Special Effect - Create a special effect at MoraiaAA_SPXPoint using Objects\Spawnmodels\Demon\InfernalMeteor\InfernalMeteor.mdl
- Special Effect - Destroy (Last created special effect)
- Wait 2.50 seconds
-
Unit Group - Pick every unit in MoraiaAA_Group and do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ((Picked unit) belongs to an enemy of (Owner of MoraiaAA_Caster).) Equal to True
-
Then - Actions
- Unit - Cause MoraiaAA_Caster to damage (Picked unit), dealing (Real((Base Damage of MoraiaAA_Caster for weapon index 0))) damage of attack type Spells and damage type Normal
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
- Custom script: call DestroyGroup(udg_MoraiaAA_Group)
- Custom script: call RemoveLocation(udg_MoraiaAA_Point)
- Custom script: call RemoveLocation(udg_MoraiaAA_SPXPoint)
- Else - Actions
-
If - Conditions
-
Events