Killing a player

Post Reply
User avatar
Wuzzy
Member
Posts: 3963
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Killing a player

by Wuzzy » Post

How do I reliably (!) kill a player?

I already tried this:

Code: Select all

player:set_hp(0)
But this only works if damage is enabled. If the damage is disabled, the player won’t die.

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

Re: Killing a player

by Calinou » Post

I don't think it's even possible to kill a player if damage is disabled, that's the point.

You can only kick them or teleport them to the spawn point.

User avatar
prestidigitator
Member
Posts: 640
Joined: Thu Feb 21, 2013 23:54

Re: Killing a player

by prestidigitator » Post

Definte "kill", anyway. ;-)

wilkgr76
Member
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Killing a player

by wilkgr76 » Post

Perhaps setup another trigger for the death formspec (and the falling over), such as a command?
N/A

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Killing a player

by azekill_DIABLO » Post

maybe teleport him into lava?

User avatar
DS-minetest
Member
Posts: 1137
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Killing a player

by DS-minetest » Post

azekill_DIABLO wrote:maybe teleport him into lava?
the player could teleport to home or spawn before he dies and if damage is disabled...
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Killing a player

by azekill_DIABLO » Post

or create a block like the MEZE mod, which kill anyone which tuchs it.

wilkgr76
Member
Posts: 831
Joined: Wed Feb 18, 2015 02:44
GitHub: wilkgr76

Re: Killing a player

by wilkgr76 » Post

azekill_DIABLO wrote:or create a block like the MEZE mod, which kill anyone which tuchs it.
With damage disabled, it's not possible...

EDIT: Or make them leave (see my sig)
Last edited by wilkgr76 on Tue Mar 29, 2016 23:51, edited 1 time in total.
N/A

User avatar
azekill_DIABLO
Member
Posts: 7494
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Killing a player

by azekill_DIABLO » Post

:[

i think the meze mod checks if you have damage [on] or [off]

maybe when deleting this it would work....

will try this!

User avatar
AiTechEye
Member
Posts: 814
Joined: Fri May 29, 2015 21:14
GitHub: AiTechEye
Location: ¯\_(ツ)_/¯

Re: Killing a player

by AiTechEye » Post

You have to hack the minetest core to do it :-)

Because it is disabled inside the damage system, so nothing can add or set damage on the players.

User avatar
DS-minetest
Member
Posts: 1137
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: DS-minetest
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Killing a player

by DS-minetest » Post

You could delete the player object.
Its like a kick.
Note that I've recently renamed myself on github and co. to "Desour". (I'm bad at naming things.)
Feel free to call me DS.

sofar
Developer
Posts: 2130
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Killing a player

by sofar » Post

disable player physics, disallow movement and put player in a location where they can't do anything? (e.g. y=-32766) that wouldn't make them dead, but they wouldn't be able to do much.

I'd argue it's a bug that there isn't a method directly to do this.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests