- Joined
- Mar 15, 2012
- Messages
- 2,885
Does anyone know why moving the locations would not work 100% when creating and destroying then recreating and destroying seems to work better? Will likely just finish converting the system to coordinates however I was wondering how this as it is wouldn't work all the time.
What happens here is units being moved faster then the basic max of 522ms usually known as projectiles or beams being moved and then clashing/colliding with each other however the bug is no clash/collision at all dealing full damage to the main units instead of being reduced or fully clashed/0'd.
[trigger=]
improved ClashSystem
Events
Time - Every 0.06 seconds of game time
Conditions
(Number of units in CollisionGroup) Greater than 0
Actions
Unit Group - Pick every unit in CollisionGroup and do (Actions)
Loop - Actions
Set Collition1 = (Picked unit)
Custom script: call MoveLocation(udg_DatClashLoc1,GetUnitX(udg_Collition1),GetUnitY(udg_Collition1))
Unit Group - Pick every unit in CollisionGroup and do (Actions)
Loop - Actions
Set Collition2 = (Picked unit)
Custom script: call MoveLocation(udg_DatClashLoc2,GetUnitX(udg_Collition2),GetUnitY(udg_Collition2))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collition1 Not equal to Collition2
((Owner of Collition1) is an ally of (Owner of Collition2)) Equal to False
(Collition1 is alive) Equal to True
(Collition2 is alive) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between DatClashLoc1 and DatClashLoc2) Less than or equal to 400.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of Collition1) Greater than or equal to (Mana of Collition2)
Then - Actions
Unit - Set mana of Collition1 to ((Mana of Collition1) - (Mana of Collition2))
Unit - Set mana of Collition2 to 0.00
Unit - Kill Collition2
Else - Actions
Unit - Set mana of Collition2 to ((Mana of Collition2) - (Mana of Collition1))
Unit - Set mana of Collition1 to 0.00
Unit - Kill Collition1
Else - Actions
Else - Actions
[/trigger]
What happens here is units being moved faster then the basic max of 522ms usually known as projectiles or beams being moved and then clashing/colliding with each other however the bug is no clash/collision at all dealing full damage to the main units instead of being reduced or fully clashed/0'd.
[trigger=]
improved ClashSystem
Events
Time - Every 0.06 seconds of game time
Conditions
(Number of units in CollisionGroup) Greater than 0
Actions
Unit Group - Pick every unit in CollisionGroup and do (Actions)
Loop - Actions
Set Collition1 = (Picked unit)
Custom script: call MoveLocation(udg_DatClashLoc1,GetUnitX(udg_Collition1),GetUnitY(udg_Collition1))
Unit Group - Pick every unit in CollisionGroup and do (Actions)
Loop - Actions
Set Collition2 = (Picked unit)
Custom script: call MoveLocation(udg_DatClashLoc2,GetUnitX(udg_Collition2),GetUnitY(udg_Collition2))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Collition1 Not equal to Collition2
((Owner of Collition1) is an ally of (Owner of Collition2)) Equal to False
(Collition1 is alive) Equal to True
(Collition2 is alive) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Distance between DatClashLoc1 and DatClashLoc2) Less than or equal to 400.00
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Mana of Collition1) Greater than or equal to (Mana of Collition2)
Then - Actions
Unit - Set mana of Collition1 to ((Mana of Collition1) - (Mana of Collition2))
Unit - Set mana of Collition2 to 0.00
Unit - Kill Collition2
Else - Actions
Unit - Set mana of Collition2 to ((Mana of Collition2) - (Mana of Collition1))
Unit - Set mana of Collition1 to 0.00
Unit - Kill Collition1
Else - Actions
Else - Actions
[/trigger]