- Joined
- Mar 16, 2014
- Messages
- 167
The knockback system by bribe no longer functions despite being the most impressive one with all of the features I would want. Updates seem to have killed it.
Which knockback systems are recommended, both in general and strictly for ones that can be called by GUI? I see many of them but they're all rejected.
My current GUI knockback system seems to consistently decrease my game's FPS by 15 or so.
Which knockback systems are recommended, both in general and strictly for ones that can be called by GUI? I see many of them but they're all rejected.
My current GUI knockback system seems to consistently decrease my game's FPS by 15 or so.
-
Knockback Call
- Events
- Conditions
-
Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- KnockbackCall_Dist Less than 0.00
-
Then - Actions
- Set VariableSet KnockbackCall_Dist = 0.00
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- KnockbackCall_Dur Less than 0.00
-
Then - Actions
- Set VariableSet KnockbackCall_Dur = 0.00
- Else - Actions
-
If - Conditions
- Set VariableSet KnockbackSys_Index = (KnockbackSys_Index + 1)
- Set VariableSet KnockbackSys_Unit[KnockbackSys_Index] = KnockbackCall_Unit
- Set VariableSet KnockbackSys_Dist[KnockbackSys_Index] = KnockbackCall_Dist
- Set VariableSet KnockbackSys_Angle[KnockbackSys_Index] = KnockbackCall_Angle
- Set VariableSet KnockbackSys_SFXPath[KnockbackSys_Index] = KnockbackCall_SFX
- Set VariableSet KnockbackSys_TickCount[KnockbackSys_Index] = (Integer((KnockbackCall_Dur / 0.04)))
- Set VariableSet KnockbackSys_Tick[KnockbackSys_Index] = 0
- Set VariableSet KnockbackSys_Sin[KnockbackSys_Index] = (90.00 / (Real(KnockbackSys_TickCount[KnockbackSys_Index])))
- Set VariableSet KnockbackSys_DestroyTree[KnockbackSys_Index] = KnockbackCall_DestroyTree
- Set VariableSet KnockbackSys_NoStun[KnockbackSys_Index] = KnockbackCall_NoStun
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Knockback Execute
-
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 VariableSet KnockbackSys_Index = (KnockbackSys_Index - 1)
-
For each (Integer A) from KnockbackSys_Looper to KnockbackSys_Index, do (Actions)
-
Loop - Actions
- Set VariableSet TempInt = (Integer A)
- Set VariableSet KnockbackSys_Unit[TempInt] = KnockbackSys_Unit[(TempInt + 1)]
- Set VariableSet KnockbackSys_Dist[TempInt] = KnockbackSys_Dist[(TempInt + 1)]
- Set VariableSet KnockbackSys_Angle[TempInt] = KnockbackSys_Angle[(TempInt + 1)]
- Set VariableSet KnockbackSys_SFXPath[TempInt] = KnockbackSys_SFXPath[(TempInt + 1)]
- Set VariableSet KnockbackSys_TickCount[TempInt] = KnockbackSys_TickCount[(TempInt + 1)]
- Set VariableSet KnockbackSys_Tick[TempInt] = KnockbackSys_Tick[(TempInt + 1)]
- Set VariableSet KnockbackSys_Sin[TempInt] = KnockbackSys_Sin[(TempInt + 1)]
- Set VariableSet KnockbackSys_DestroyTree[TempInt] = KnockbackSys_DestroyTree[(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 VariableSet KnockbackSys_Tick[KnockbackSys_Looper] = (KnockbackSys_Tick[KnockbackSys_Looper] + 1)
- Set VariableSet TempReal = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real((KnockbackSys_Tick[KnockbackSys_Looper] - 1)))))))
- Set VariableSet TempReal2 = (KnockbackSys_Dist[KnockbackSys_Looper] x (Sin((KnockbackSys_Sin[KnockbackSys_Looper] x (Real(KnockbackSys_Tick[KnockbackSys_Looper]))))))
- Set VariableSet TempLoc = (Position of KnockbackSys_Unit[KnockbackSys_Looper])
- Set VariableSet TempLoc2 = (TempLoc offset by (TempReal2 - TempReal) towards KnockbackSys_Angle[KnockbackSys_Looper] degrees.)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Matching unit) Not equal to RibCageImpaleVictim
- ((Matching unit) is in HohenHookGroup.) Equal to False
- ((Matching unit) is in MayHookGroup.) Equal to False
- ((Matching unit) is in SeduceNoClip.) Equal to False
-
Or - Any (Conditions) are true
-
Conditions
- ((Matching unit) is A Hero) Equal to True
- (Custom value of (Matching unit)) Equal to 420
-
Conditions
-
Then - Actions
- Set VariableSet CP_Point = TempLoc2
- Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CP_PointIsWalkable Equal to True
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- KnockbackCall_NoStun Equal to False
-
Then - Actions
- Unit - Move KnockbackSys_Unit[KnockbackSys_Looper] instantly to TempLoc2
-
Else - Actions
- Set VariableSet CP_Point = TempLoc2
- Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CP_PointIsWalkable Equal to True
-
Then - Actions
- Custom script: call SetUnitX(udg_KnockbackSys_Unit[udg_KnockbackSys_Looper], GetLocationX(udg_TempLoc2))
- Custom script: call SetUnitY(udg_KnockbackSys_Unit[udg_KnockbackSys_Looper], GetLocationY(udg_TempLoc2))
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Unit-type of (Matching unit)) Not equal to Boat (Yok Island)
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- KnockbackCall_NoStun Equal to False
-
Then - Actions
- Unit - Move KnockbackSys_Unit[KnockbackSys_Looper] instantly to TempLoc2
-
Else - Actions
- Set VariableSet CP_Point = TempLoc2
- Trigger - Run Check Walkability <gen> (ignoring conditions)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- CP_PointIsWalkable Equal to True
-
Then - Actions
- Custom script: call SetUnitX(udg_KnockbackSys_Unit[udg_KnockbackSys_Looper], GetLocationX(udg_TempLoc2))
- Custom script: call SetUnitY(udg_KnockbackSys_Unit[udg_KnockbackSys_Looper], GetLocationY(udg_TempLoc2))
- Else - Actions
-
If - Conditions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Else - Actions
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
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
-
Check Walkability Setup
-
Events
- Map initialization
- Conditions
-
Actions
- Set VariableSet CP_Rect = (Region(0.00, 0.00, 128.00, 128.00))
- Custom script: set udg_CP_Item = CreateItem('wtlg', 0, 0)
- Item - Hide CP_Item
- -------- Variables For Copy and Paste --------
- Set VariableSet CP_HiddenItemsIndex = 0
- Set VariableSet CP_HiddenItems[0] = No item
- Set VariableSet CP_Point = (Target point of ability being cast)
- Set VariableSet CP_PointIsWalkable = False
-
Events
-
Check Walkability
- Events
- Conditions
-
Actions
- Custom script: local real x = GetLocationX(udg_CP_Point)
- Custom script: local real y = GetLocationY(udg_CP_Point)
- Custom script: local real x2 = 0
- Custom script: local real y2 = 0
- Custom script: call MoveRectTo(udg_CP_Rect, x, y)
-
Item - Pick every item in CP_Rect and do (Actions)
-
Loop - Actions
- Custom script: if IsItemVisible(GetEnumItem()) then
- Set VariableSet CP_HiddenItems[CP_HiddenItemsIndex] = (Picked item)
- Custom script: call SetItemVisible(udg_CP_HiddenItems[udg_CP_HiddenItemsIndex], false)
- Set VariableSet CP_HiddenItemsIndex = (CP_HiddenItemsIndex + 1)
- Custom script: endif
-
Loop - Actions
- Custom script: call SetItemPosition(udg_CP_Item, x, y)
- Custom script: set x2 = GetItemX(udg_CP_Item)
- Custom script: set y2 = GetItemY(udg_CP_Item)
- Custom script: call SetItemVisible(udg_CP_Item, false)
- Custom script: loop
- Custom script: exitwhen udg_CP_HiddenItemsIndex <= 0
- Custom script: set udg_CP_HiddenItemsIndex = udg_CP_HiddenItemsIndex - 1
- Custom script: call SetItemVisible(udg_CP_HiddenItems[udg_CP_HiddenItemsIndex], true)
- Custom script: set udg_CP_HiddenItems[udg_CP_HiddenItemsIndex] = null
- Custom script: endloop
- Custom script: set udg_CP_PointIsWalkable = ((x2-x)[I](x2-x) + (y2-y)[/I](y2-y) <= 100) and (not IsTerrainPathable(x, y, PATHING_TYPE_WALKABILITY))