Controlling a players movment.

Post Reply
LC Creations
Member
Posts: 159
Joined: Mon Feb 18, 2019 02:53
GitHub: LandonAConway

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?
cdb_ac3a146dcafb

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: 2574
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: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 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: 159
Joined: Mon Feb 18, 2019 02:53
GitHub: LandonAConway

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?
cdb_ac3a146dcafb

User avatar
Andrey01
Member
Posts: 2574
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 7 guests