All_Out_Mapp
Member
- Reaction score
- 0
So... I have the system set up for Knockback.
Just like so, i believe everything is accurate.
But when i use it in my move, although i followed an example presicely; the units all slide in one direction instead of in separate directions.
Heres my version of the move.
anyone see anything wrong with it? or know what i did wrong
Trigger:
- KnockbackCall
- Events
- Conditions
- Actions
- Set KnockbackSys_Index = (KnockbackSys_Index + 1)
- Set KnockbackSys_Unit[KnockbackSys_Index] = KnockbackCall_Unit
- Set KnockbackSys_Dist[KnockbackSys_Index] = KnockbackCall_Dist
- Set KnockbackSys_Angle[KnockbackSys_Index] = KnockbackCall_Angle
- Set KnockbackSys_SFXPath[KnockbackSys_Index] = KnockbackCall_SFX
- Set KnockbackSys_TickCount[KnockbackSys_Index] = (Integer((KnockbackCall_Dur / 0.04)))
- Set KnockbackSys_Tick[KnockbackSys_Index] = 0
- Set KnockbackSys_Sin[KnockbackSys_Index] = (90.00 / (Real(KnockbackSys_TickCount[KnockbackSys_Index])))
- Set KnockbackSys_DestroyTree[KnockbackSys_Index] = KnockbackCall_DestroyTree
Trigger:
- KnockbackExecute
- Events
- Time - Every 0.04 seconds of game time
- Conditions
- Actions
- For each (Integer KnockbackSys_Looper) from 1 to KnockbackSys_Index, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- KnockbackSys_Tick[KnockbackSys_Looper] Greater than KnockbackSys_TickCount[KnockbackSys_Looper]
- Then - Actions
- Set KnockbackSys_Index = (KnockbackSys_Index - 1)
- For each (Integer A) from KnockbackSys_Looper to KnockbackSys_Index, do (Actions)
- Loop - Actions
- Set TempInt = (Integer A)
- Set KnockbackSys_Unit[TempInt] = KnockbackSys_Unit[(TempInt + 1)]
- Set KnockbackSys_Dist[TempInt] = KnockbackSys_Dist[(TempInt + 1)]
- Set KnockbackSys_Angle[TempInt] = KnockbackSys_Angle[(TempInt + 1)]
- Set KnockbackSys_SFXPath[TempInt] = KnockbackSys_SFXPath[(TempInt + 1)]
- Set KnockbackSys_TickCount[TempInt] = (TempInt + 1)
- Set KnockbackSys_Tick[TempInt] = KnockbackSys_Tick[(TempInt + 1)]
- Set KnockbackSys_Sin[TempInt] = KnockbackSys_Sin[(TempInt + 1)]
- Loop - Actions
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- KnockbackSys_Tick[KnockbackSys_Looper] Less than or equal to KnockbackSys_TickCount[KnockbackSys_Looper]
- Then - Actions
- Set KnockbackSys_Tick[KnockbackSys_Looper] = (KnockbackSys_Tick[KnockbackSys_Looper] + 1)
- Set TempReal = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real((KnockbackSys_Tick[KnockbackSys_Looper] - 1)))))))
- Set TempReal2 = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real(KnockbackSys_Tick[KnockbackSys_Looper]))))))
- Set TempLoc = (Position of KnockbackSys_Unit[KnockbackSys_Looper])
- Set TempLoc2 = (TempLoc offset by (TempReal2 - TempReal) towards KnockbackSys_Angle[KnockbackSys_Index] degrees)
- Unit - Move KnockbackSys_Unit[KnockbackSys_Looper] instantly to TempLoc2
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- KnockbackSys_DestroyTree[KnockbackSys_Looper] Equal to True
- Then - Actions
- Destructible - Pick every destructible within 200.00 of TempLoc2 and do (Actions)
- Loop - Actions
- Destructible - Kill (Picked destructible)
- Loop - Actions
- Destructible - Pick every destructible within 200.00 of TempLoc2 and do (Actions)
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- KnockbackSys_SFXPath[KnockbackSys_Looper] Not equal to <Empty String>
- Then - Actions
- Special Effect - Create a special effect at TempLoc2 using KnockbackSys_SFXPath[KnockbackSys_Looper]
- Special Effect - Destroy (Last created special effect)
- Else - Actions
- If - Conditions
- Custom script: call RemoveLocation( udg_TempLoc )
- Custom script: call RemoveLocation( udg_TempLoc2 )
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer KnockbackSys_Looper) from 1 to KnockbackSys_Index, do (Actions)
- Events
Just like so, i believe everything is accurate.
But when i use it in my move, although i followed an example presicely; the units all slide in one direction instead of in separate directions.
Heres my version of the move.
Trigger:
- Kenisis
- Events
- Unit - A unit Begins casting an ability
- Conditions
- (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 1
- Actions
- Unit - Pause (Triggering unit)
- Set TempUnit = (Triggering unit)
- Set TempLoc = (Position of TempUnit)
- Set TempGroup = (Units within 500.00 of TempLoc matching (((((Matching unit) is A structure) Equal to False) and (((Matching unit) is alive) Equal to True)) and (((Matching unit) belongs to an enemy of (Owner of TempUnit)) Equal to True)))
- Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit))) and do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Picked unit) Not equal to (Triggering unit)
- Then - Actions
- Unit - Pause (Picked unit)
- Unit - Add Storm Crow Form to (Picked unit)
- Animation - Change (Picked unit) flying height to (500.00 - (Distance between (Position of (Triggering unit)) and (Position of (Picked unit)))) at 500.00
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Wait 3.00 seconds
- Unit Group - Pick every unit in TempGroup and do (Actions)
- Loop - Actions
- Unit - Unpause (Picked unit)
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Level of Kinetic Barrier for (Triggering unit)) Greater than or equal to 6
- Then - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing (((Real((Level of Kinetic Barrier for (Triggering unit)))) x 50.00) - 100.00) damage of attack type Spells and damage type Normal
- Else - Actions
- Unit - Cause (Triggering unit) to damage (Picked unit), dealing (25.00 + ((Real((Level of Kinetic Barrier for (Triggering unit)))) x 25.00)) damage of attack type Spells and damage type Normal
- If - Conditions
- Set TempLoc2 = (Position of (Picked unit))
- Set KnockbackCall_Unit = (Picked unit)
- Set KnockbackCall_Dur = 2.00
- Set KnockbackCall_Dist = (500.00 - (Distance between TempLoc and TempLoc2))
- Set KnockbackCall_Angle = (Angle from TempLoc to TempLoc2)
- Set KnockbackCall_SFX = Abilities\Spells\Human\Flare\FlareTarget.mdl
- Trigger - Run KnockbackCall <gen> (ignoring conditions)
- Custom script: call RemoveLocation( udg_TempLoc2 )
- Loop - Actions
- Custom script: call DestroyGroup( udg_TempGroup )
- Custom script: call RemoveLocation( udg_TempLoc )
- Unit Group - Pick every unit in (Units within 500.00 of (Position of (Triggering unit)) matching (((Matching unit) belongs to an enemy of (Triggering player)) Equal to True)) and do (Actions)
- Loop - Actions
- Animation - Change (Picked unit) flying height to 0.00 at 1000.00
- Unit - Remove Storm Crow Form from (Picked unit)
- Loop - Actions
- Unit - Unpause (Triggering unit)
- Wait 2.00 seconds
- Unit Group - Pick every unit in (Units in (Playable map area) matching (((Matching unit) has buff Kinesis ) Equal to True)) and do (Actions)
- Loop - Actions
- Animation - Change (Picked unit) flying height to 0.00 at 100.00
- Unit - Remove Storm Crow Form from (Picked unit)
- Unit - Unpause (Picked unit)
- Loop - Actions
- Events
anyone see anything wrong with it? or know what i did wrong