Jump to content

Run function on player movement


Recommended Posts

Hi guys,

 

How to write a function, that would run every time the player moves? I found how to modify the player character using AddSimPostInit, but can't find a command that would run my function every time player moves.

 

Cheers!

Edited by Hoit
Link to comment
Share on other sites

@Hoit, event locomote from the locomotor component. If you're going to be adding this specifically to a specific player character you should be using AddPrefabPostInit( "characterName" ); if you want to add it to all players you should use AddPlayerPostInit( function ).

 

AddSimPostInit is not the proper way to do things in Don't Starve Together.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...