Triazic Posted September 28, 2022 Share Posted September 28, 2022 Hi, I need a function to stop/cancel the current action of the player (eg. perhaps the player has queued an action to pick a flower and I want the player to stop in their tracks for other UI purposes). As a guess, perhaps there is something in the API like: ThePlayer.actionQueue:Clear() ThePlayer.controller:StopAction() Something to that effect. Happy for hacky stuff like triggering some dummy function to 'walkto' a location 0.001m away etc to override the current action. Link to comment https://forums.kleientertainment.com/forums/topic/143403-cancelstop-current-action/ Share on other sites More sharing options...
Wonderlarr Posted September 28, 2022 Share Posted September 28, 2022 (edited) If inst is your player, try these both together inst.components.locomotor:Stop() -- stops any walking, including any associated with an action inst:ClearBufferedAction() -- stops all actions, but it's best to call it after the above Edited September 28, 2022 by TheSkylarr Link to comment https://forums.kleientertainment.com/forums/topic/143403-cancelstop-current-action/#findComment-1599701 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now