[SOLVED]How to detect if a player is moving?
[SOLVED]How to detect if a player is moving?
I'd like to detect if a player is running. Is there any way to do so?
Last edited by Villfuk02 on Tue May 01, 2018 2:02 pm, edited 1 time in total.
Re: How to detect if a player is moving?
http://lua-api.factorio.com/latest/even ... d_positionVillfuk02 wrote:I'd like to detect if a player is running. Is there any way to do so?
Re: How to detect if a player is moving?
Tis looks usable. Not exactly what i was looking for, but with few lines of code, i can divide by moving speed (affected by exoskeletons, etc..)and ignore other means of transportation. THANKS!
Re: How to detect if a player is moving?
Yes i just wondered because your topic states moving and your text states running.Villfuk02 wrote:Tis looks usable. Not exactly what i was looking for, but with few lines of code, i can divide by moving speed (affected by exoskeletons, etc..)and ignore other means of transportation. THANKS!
There is no LuaPlayer.speed or i didn't find it.
Re: How to detect if a player is moving?
I just meant if he is normally walking/running (default by using WASD)
Re: How to detect if a player is moving?
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5206
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: How to detect if a player is moving?
Depending on what level of precision you need, either .walking_state (linked by Rsed) or defines.events.on_player_changed_position.
Re: How to detect if a player is moving?
Thanks! that's exactly what i searched for