Controlling a players movment.

Post Reply
LC Creations
Member
Posts: 157
Joined: Mon Feb 18, 2019 02:53

Controlling a players movment.

by LC Creations » Post

Working on a mod that controls a player and locks their position then does goes wherever I go. Is this possible?

srinivas
Member
Posts: 25
Joined: Sun May 19, 2019 06:16
GitHub: samarth-ramesh
IRC: srinivas
In-game: samarthr1
Location: Hyderabad India

Re: Controlling a players movment.

by srinivas » Post

It should work just fine. Did you mean where you go it follows, something like mary and her little lamb?

User avatar
Andrey01
Member
Posts: 2464
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Controlling a players movment.

by Andrey01 » Post

If player is enforced to lock his position, I suppose you need to set speed and jump to null by calling set_physics_override({speed=0, jump=0}). Then, again call that method, only with previous arguments. All is done much easily.

User avatar
Festus1965
Member
Posts: 1632
Joined: Sun Jan 03, 2016 11:58
In-game: Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: Controlling a players movment.

by Festus1965 » Post

LC Creations wrote:
Sat Jul 04, 2020 23:00
Working on a mod that controls a player and locks their position then does goes wherever I go. Is this possible?
Ins't that kind of movement part of mobs (after track you, follow you and hit ?)
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

LC Creations
Member
Posts: 157
Joined: Mon Feb 18, 2019 02:53

Re: Controlling a players movment.

by LC Creations » Post

Andrey01 wrote:
Sun Jul 05, 2020 08:29
If player is enforced to lock his position, I suppose you need to set speed and jump to null by calling set_physics_override({speed=0, jump=0}). Then, again call that method, only with previous arguments. All is done much easily.
And then how would I reset the physics override back to default?

User avatar
Andrey01
Member
Posts: 2464
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

Re: Controlling a players movment.

by Andrey01 » Post

LC Creations wrote:
Sun Jul 05, 2020 20:26
Andrey01 wrote:
Sun Jul 05, 2020 08:29
If player is enforced to lock his position, I suppose you need to set speed and jump to null by calling set_physics_override({speed=0, jump=0}). Then, again call that method, only with previous arguments. All is done much easily.
And then how would I reset the physics override back to default?
set_physics_override({speed=1, jump=1}) is default https://github.com/minetest/minetest/bl ... .txt#L6125

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests