Expanded script command unitstopwalk (#2258)

Fixes #2254.
Added an optional flag to specify the types of methods to stop a unit from walking.
Created an enum for the unit_stop_walking flags.
Thanks to @Yuchinin and @Lemongrass3110!
This commit is contained in:
Aleos
2017-07-16 10:05:17 -04:00
committed by Lemongrass3110
parent 574c753945
commit d86c8a81be
5 changed files with 43 additions and 13 deletions

View File

@@ -7370,7 +7370,7 @@ This command will make a <GID> stop attacking.
---------------------------------------
*unitstopwalk <GID>;
*unitstopwalk <GID>{,<flag>};
This command will make a <GID> stop moving.
@@ -7378,6 +7378,14 @@ Note: If this is called from OnTouch, then the walktimer attached to the unit is
removed from OnTouch which causes this command to not stop the unit from walking.
Suggest to use 'unitblockmove' to forcefully stop the unit with OnTouch.
The <flag> value affects how the unit is stopped. The following flags are bitwise
values (can be combined using the pipe operator):
USW_NONE = Unit will keep walking to their original destination.
USW_FIXPOS = Issue a fixpos packet afterwards.
USW_MOVE_ONCE = Force the unit to move one cell if it hasn't yet.
USW_MOVE_FULL_CELL = Enable moving to the next cell when unit was already half-way there (may cause on-touch/place side-effects, such as a scripted map change).
USW_FORCE_STOP = Force stop moving.
---------------------------------------
*unittalk <GID>,"<text>"{,flag};