- Joined
- Mar 24, 2013
- Messages
- 1,105
Basically the wrong dummy is spawning meaning the wrong PlayerNumber[udg_Toss_CurrentIndex] is being had, but I'm not sure why it would be wrong.
What you're about to see is less than satisfactory coding, but try your best to follow it
I put all the triggers here, but the 1st and 2nd should be the only relevant ones.
What you're about to see is less than satisfactory coding, but try your best to follow it
I put all the triggers here, but the 1st and 2nd should be the only relevant ones.
-
Toss Cast
-
Events
- Unit - A unit Starts the effect of an ability
-
Conditions
- (Ability being cast) Equal to (==) Toss_Ability
-
Actions
- Set Toss_MaxIndex = (Toss_MaxIndex + 1)
- Set Throwing_Unit[Toss_MaxIndex] = (Triggering unit)
- Set PlayerNumber[Toss_MaxIndex] = (Player number of (Owner of Throwing_Unit[Toss_MaxIndex]))
- Set Toss_TargetPoint[Toss_MaxIndex] = (Target point of ability being cast)
- Set TempLoc = (Position of Throwing_Unit[Toss_MaxIndex])
- Set TempLoc2 = Toss_TargetPoint[Toss_MaxIndex]
- Set Toss_Distance[Toss_MaxIndex] = (Distance between TempLoc and TempLoc2)
- Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is A structure) Not equal to (!=) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Custom value of (Matching unit)) Equal to (==) 0) and ((Matching unit) Not equal to (!=) (Triggerin
- Set Thrown_Unit[Toss_MaxIndex] = (Random unit from TempGroup)
-
Unit - Set the custom value of Thrown_Unit[Toss_MaxIndex] to 1
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Thrown_Unit[Toss_MaxIndex]) Not equal to (!=) Mountain Giant
-
Then - Actions
- Unit - Pause the expiration timer for Thrown_Unit[Toss_MaxIndex]
- Unit - Make Thrown_Unit[Toss_MaxIndex] Invulnerable
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Custom script: call SetUnitPropWindow(udg_Thrown_Unit[udg_Toss_MaxIndex], 0)
- Custom script: if UnitAddAbility(udg_Thrown_Unit[udg_Toss_MaxIndex], 'Amrf') then
- Custom script: call UnitRemoveAbility(udg_Thrown_Unit[udg_Toss_MaxIndex], 'Amrf')
- Custom script: endif
- Trigger - Turn on Toss Loop <gen>
- Custom script: call RemoveLocation(udg_TempLoc)
- Custom script: call DestroyGroup(udg_TempGroup)
-
Events
-
Toss Loop
-
Events
- Time - Every 0.03 seconds of game time
- Conditions
-
Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Toss_MaxIndex Equal to (==) 0
-
Then - Actions
- Trigger - Turn off (This trigger)
-
Else - Actions
-
Do Multiple ActionsFor each (Integer Toss_CurrentIndex) from 1 to Toss_MaxIndex, do (Actions)
-
Loop - Actions
- Set TempLoc = (Position of Thrown_Unit[Toss_CurrentIndex])
-
Set TempLoc2 = Toss_TargetPoint[Toss_CurrentIndex]
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between TempLoc and TempLoc2) Less than or equal to (<=) Toss_ThresholdRange
-
Then - Actions
- Custom script: call SetUnitPropWindow(udg_Thrown_Unit[udg_Toss_CurrentIndex], 1)
- Special Effect - Create a special effect attached to the origin of Thrown_Unit[Toss_CurrentIndex] using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
-
Special Effect - Destroy (Last created special effect)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Not equal to (!=) Mountain Giant
-
Then - Actions
- Unit - Explode Thrown_Unit[Toss_CurrentIndex]
- Special Effect - Create a special effect at TempLoc using Abilities\Spells\Orc\WarStomp\WarStompCaster.mdl
- Special Effect - Destroy (Last created special effect)
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Set TempGroup = (Units within Toss_AOE[PlayerNumber[Toss_CurrentIndex]] of TempLoc matching ((((Matching unit) is alive) Equal to (==) True) and ((((Matching unit) belongs to an ally of (Owner of Throwing_Unit[PlayerNumber[Toss_CurrentIndex]])) Not equal to (!=) True) and ((
- Unit - Create 1 Dummy for (Owner of Throwing_Unit[PlayerNumber[Toss_CurrentIndex]]) at TempLoc2 facing Default building facing (270.0) degrees
- Set TempUnit = (Last created unit)
- Unit - Add a 10.00 second Generic expiration timer to TempUnit
-
Unit Group - Pick every unit in TempGroup and do (Actions)
-
Loop - Actions
-
Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Nuke Rock
-
Then - Actions
- Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Icy Rock
-
Then - Actions
- Unit - Order TempUnit to Undead Lich - Frost Nova (Picked unit)
- Unit - Cause TempUnit to damage (Picked unit), dealing (Toss_Damage[PlayerNumber[Toss_CurrentIndex]] x 0.25) damage of attack type Spells and damage type Cold
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of Thrown_Unit[Toss_CurrentIndex]) Equal to (==) Fiery Rock
-
Then - Actions
- Unit - Order TempUnit to Human Mountain King - Storm Bolt (Picked unit)
- Unit - Cause TempUnit to damage (Picked unit), dealing (Toss_Damage[PlayerNumber[Toss_CurrentIndex]] x 0.05) damage of attack type Spells and damage type Normal
- Else - Actions
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Unit - Cause TempUnit to damage (Picked unit), dealing Toss_Damage[PlayerNumber[Toss_CurrentIndex]] damage of attack type Chaos and damage type Universal
-
Loop - Actions
- Unit - Set the custom value of Thrown_Unit[Toss_CurrentIndex] to 0
- Animation - Change Thrown_Unit[Toss_CurrentIndex] flying height to 0.00 at 650.00
- Set Thrown_Unit[Toss_CurrentIndex] = Thrown_Unit[Toss_MaxIndex]
- Set Toss_TargetPoint[Toss_CurrentIndex] = Toss_TargetPoint[Toss_MaxIndex]
- Set PlayerNumber[Toss_CurrentIndex] = PlayerNumber[Toss_MaxIndex]
- Set Toss_CurrentIndex = (Toss_CurrentIndex - 1)
- Set Toss_MaxIndex = (Toss_MaxIndex - 1)
- Custom script: call RemoveLocation(udg_TempLoc2)
- Custom script: call DestroyGroup(udg_TempGroup)
-
Else - Actions
- Set TempReal = (Angle from TempLoc to TempLoc2)
- Custom script: call SetUnitX(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetUnitX(udg_Thrown_Unit[udg_Toss_CurrentIndex]) + udg_Toss_SpeedInterval[udg_PlayerNumber[udg_Toss_CurrentIndex]] * Cos(bj_DEGTORAD * udg_TempReal))
-
Custom script: call SetUnitY(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetUnitY(udg_Thrown_Unit[udg_Toss_CurrentIndex]) + udg_Toss_SpeedInterval[udg_PlayerNumber[udg_Toss_CurrentIndex]] * Sin(bj_DEGTORAD * udg_TempReal))
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Distance between Toss_TargetPoint[Toss_CurrentIndex] and TempLoc) Less than or equal to (<=) (Toss_Distance[Toss_CurrentIndex] / 2.00)
-
Then - Actions
- Custom script: call SetUnitFlyHeight(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetParabolaZ((udg_Toss_Distance[udg_Toss_CurrentIndex]/2), udg_Toss_Distance[udg_Toss_CurrentIndex], 0),650)
-
Else - Actions
- Custom script: call SetUnitFlyHeight(udg_Thrown_Unit[udg_Toss_CurrentIndex], GetParabolaZ((udg_Toss_Distance[udg_Toss_CurrentIndex]/2), udg_Toss_Distance[udg_Toss_CurrentIndex], 1300), 650)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Custom script: call RemoveLocation(udg_TempLoc)
-
Loop - Actions
-
Do Multiple ActionsFor each (Integer Toss_CurrentIndex) from 1 to Toss_MaxIndex, do (Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Events
-
Toss Setup
-
Events
- Map initialization
- Conditions
-
Actions
-
Do Multiple ActionsFor each (Integer TempInteger) from 1 to 12, do (Actions)
-
Loop - Actions
- Set Toss_AOE[TempInteger] = 250.00
- Set Toss_Speed[TempInteger] = 800.00
- Set Toss_SpeedInterval[TempInteger] = (Toss_Speed[TempInteger] x 0.03)
- Set Toss_Damage[TempInteger] = 250.00
- Set RockQuality[TempInteger] = 0.00
- Set RockCount[TempInteger] = 3
- Set RockCount_TimerLength[TempInteger] = 30.00
- Countdown Timer - Start RockCount_Timer[TempInteger] as a One-shot timer that will expire in 30.00 seconds
-
Loop - Actions
- Set Toss_ThresholdRange = 100.00
- Set Toss_Ability = Toss (New)
-
Do Multiple ActionsFor each (Integer TempInteger) from 1 to 12, do (Actions)
-
Events
-
Stop Toss
-
Events
- Unit - A unit Is issued an order targeting a point
-
Conditions
- (Issued order) Equal to (==) (Order(healingspray))
-
Actions
- Set TempLoc = (Position of (Triggering unit))
- Set TempLoc2 = (Target point of issued order)
- Set TempGroup = (Units within 300.00 of TempLoc matching ((((Matching unit) is A structure) Not equal to (!=) True) and ((((Matching unit) is alive) Equal to (==) True) and (((Custom value of (Matching unit)) Equal to (==) 0) and ((Matching unit) Not equal to (!=) (Triggerin
-
Set TempPlayer = (Triggering player)
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Number of units in TempGroup) Greater than (>) 0
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- GameMode Equal to (==) 1
-
Then - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
- (SelectedRegions[1] contains TempLoc2) Equal to (==) True
- (SelectedRegions[2] contains TempLoc2) Equal to (==) True
- (SelectedRegions[3] contains TempLoc2) Equal to (==) True
- (SelectedRegions[4] contains TempLoc2) Equal to (==) True
- (SelectedRegions[5] contains TempLoc2) Equal to (==) True
- (SelectedRegions[6] contains TempLoc2) Equal to (==) True
- (SelectedRegions[8] contains TempLoc2) Equal to (==) True
- (SelectedRegions[7] contains TempLoc2) Equal to (==) True
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
- Then - Actions
-
Else - Actions
- Unit - Pause (Triggering unit)
- Unit - Order (Triggering unit) to Stop
- Unit - Unpause (Triggering unit)
- Custom script: call SimError(udg_TempPlayer, udg_ErrorString[1])
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
-
Conditions
- (SelectedRegions[9] contains TempLoc2) Equal to (==) True
-
Conditions
-
Multiple ConditionsOr - Any (Conditions) are true
- Then - Actions
-
Else - Actions
- Unit - Pause (Triggering unit)
- Unit - Order (Triggering unit) to Stop
- Unit - Unpause (Triggering unit)
- Custom script: call SimError(udg_TempPlayer, udg_ErrorString[1])
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
- Unit - Pause (Triggering unit)
- Unit - Order (Triggering unit) to Stop
- Unit - Unpause (Triggering unit)
- Custom script: call SimError(udg_TempPlayer, udg_ErrorString[2])
-
If - Conditions
-
Multiple FunctionsIf (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Custom script: call RemoveLocation(udg_TempLoc)
- Custom script: call RemoveLocation(udg_TempLoc2)
- Custom script: call DestroyGroup(udg_TempGroup)
-
Events