Hi There,
So i write an attack script that when Player do an attack animation,
player won't be able to do movement, i'm using 'KickStarter.stateHandler.SetMovementSystem (false);'.
The problem is when i press the movement button then disable the movement system,
player keep moving according to last input button until it get enabled again,
i think that's because AC's player keep save the last input value.
Anyone?
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
Hello,
what kind of movement method are you using? I went quickly through documentation and in case you are using Point and Click, you could possibly use AC.Player.EndPath()
https://adventurecreator.org/scripting-guide/class_a_c_1_1_player.html#acbc12798ecb9a6fddbca554819426f61
or possibly AC.Char.Halt() in any case of movement method? https://adventurecreator.org/scripting-guide/class_a_c_1_1_char.html#ae03cf0c152f2076b6368df0e886e2a44
I'm unable to try myself, but maybe someone more experienced will come around before Chris ultimately gives the right answer
Hello @StanleyRos ,
Thanks's for your comment.
i'm using direct movement method,
I just tried your suggestion to use AC.Char.Halt(),
Well, it works,
but it caused the player movement or animation a little bit strange (shaking animation).
Instead, i'm using AC.Char.StartDecelarating(), it's perfect.
It solved this problem.