Is there a fonction to retrieve player coordinates ?

Post Reply
wheat8
Member
Posts: 41
Joined: Sat Jul 20, 2024 13:06
Location: France

Is there a fonction to retrieve player coordinates ?

by wheat8 » Post

I would like to create a mod that add difficulty and loot based on "how far the player is from (0;0;0)".
Is there a command that exist to retrieve the coordinates of a player ? And do you think it would be possible to change mobs characteristics (health, damage, loot) based on those coordinates ?

User avatar
TenPlus1
Member
Posts: 4017
Joined: Mon Jul 29, 2013 13:38
In-game: TenPlus1
Contact:

Re: Is there a fonction to retrieve player coordinates ?

by TenPlus1 » Post

I'd recommend reading this guide, it will show you how to do things like player:get_pos() and how to edit mob object:get_luaentity() values :- https://api.minetest.net/

wheat8
Member
Posts: 41
Joined: Sat Jul 20, 2024 13:06
Location: France

Re: Is there a fonction to retrieve player coordinates ?

by wheat8 » Post

Thank you TenPlus1.
Absolute noob here, this documentation will help !

Post Reply