Ryuu
I am back with Chocolate (:
- Reaction score
- 64
Code:
Movement System
Events
Time - Every 0.01 seconds of game time
Conditions
Actions
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
For each (Integer B) from 1 to GLOBAL_NumberOfHeroes, do (Actions)
Loop - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
GLOBAL_HeroType[(Integer B)] Equal to (Unit-type of GLOBAL_Hero[(Integer A)])
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to True
MSystem_DownCheck[(Integer A)] Equal to False
MSystem_LeftCheck[(Integer A)] Equal to False
MSystem_RightCheck[(Integer A)] Equal to False
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 90.00 degrees)
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to False
MSystem_DownCheck[(Integer A)] Equal to True
MSystem_LeftCheck[(Integer A)] Equal to False
MSystem_RightCheck[(Integer A)] Equal to False
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 270.00 degrees)
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to False
MSystem_DownCheck[(Integer A)] Equal to False
MSystem_LeftCheck[(Integer A)] Equal to True
MSystem_RightCheck[(Integer A)] Equal to False
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 180.00 degrees)
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to False
MSystem_DownCheck[(Integer A)] Equal to False
MSystem_LeftCheck[(Integer A)] Equal to False
MSystem_RightCheck[(Integer A)] Equal to True
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 360.00 degrees)
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to True
MSystem_DownCheck[(Integer A)] Equal to False
MSystem_LeftCheck[(Integer A)] Equal to True
MSystem_RightCheck[(Integer A)] Equal to False
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 135.00 degrees)
Unit - Make GLOBAL_Hero[(Player number of (Triggering player))] face 135.00 over 0.00 seconds
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to True
MSystem_DownCheck[(Integer A)] Equal to True
MSystem_LeftCheck[(Integer A)] Equal to False
MSystem_RightCheck[(Integer A)] Equal to True
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 45.00 degrees)
Unit - Make GLOBAL_Hero[(Player number of (Triggering player))] face 45.00 over 0.00 seconds
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to False
MSystem_DownCheck[(Integer A)] Equal to True
MSystem_LeftCheck[(Integer A)] Equal to True
MSystem_RightCheck[(Integer A)] Equal to False
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 225.00 degrees)
Unit - Make GLOBAL_Hero[(Player number of (Triggering player))] face 225.00 over 0.00 seconds
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
MSystem_UpCheck[(Integer A)] Equal to False
MSystem_DownCheck[(Integer A)] Equal to True
MSystem_LeftCheck[(Integer A)] Equal to False
MSystem_RightCheck[(Integer A)] Equal to True
Then - Actions
Set MSystem_UnitLoc = (Position of GLOBAL_Hero[(Integer A)])
Set MSystem_DestinationLoc = (MSystem_UnitLoc offset by MSystem_HeroSpeed[(Integer B)] towards 315.00 degrees)
Unit - Make GLOBAL_Hero[(Player number of (Triggering player))] face 315.00 over 0.00 seconds
Animation - Play GLOBAL_Hero[(Integer A)]'s GLOBAL_HerosMoveAnim[(Integer B)] animation
Unit - Order GLOBAL_Hero[(Integer A)] to Move To MSystem_DestinationLoc
Custom script: call RemoveLocation(udg_MSystem_UnitLoc)
Custom script: call RemoveLocation(udg_MSystem_DestinationLoc)
Else - Actions
Else - Actions
The thing is, if you tested this, the hero moves correctly, but he moves riggedly (is there such a word?). I don't really know how to explain this type of movement.
The second thing: is there a way to cast a spell while moving using this system?
Thanks alot !
+rep.