1

Help needed with spawning blocks at dead players

LDP's Avatar LDP8/1/15 8:49 pm
1 emeralds 1.1k 12
8/8/2015 11:43 pm
Jmal116's Avatar Jmal116
As the title says I require help making a system that spawns blocks at a players death point the block I'm trying to spawn is a banner for a minigame I'm working on please help.
Posted by LDP's Avatar
LDP
Level 3 : Apprentice Explorer
0

Create an account or sign in to comment.

12

1
08/08/2015 3:46 am
Level 39 : Artisan Sailor
tomatotownn
tomatotownn's Avatar
GENIUS! Brilliant!
1
08/08/2015 4:53 am
Level 1 : New Explorer
Hippy_
Hippy_'s Avatar
Thanks . Hope it helped.
1
08/08/2015 3:39 am
Level 1 : New Explorer
Hippy_
Hippy_'s Avatar
Another way is to create a health objective:

/scoreboard objectives add Health health

And then set the blocks at the player when their health is 0:

/execute @a[score_Health=0] ~ ~ ~ /setblock ~ ~ ~ BLOCK-ID

Replace BLOCK;-ID with the block you want. Also run the command on a fill clock.
1
08/08/2015 11:43 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
The problem is that you can't target dead players. So unless their health is set to 0 and then they die one tick later, this will still be unable to detect them until they respawn, and will then have 20 health.
1
08/08/2015 3:43 am
Level 22 : Expert Network
YTCereal
YTCereal's Avatar
he read my mind.. thats the answer
1
08/03/2015 10:32 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
Well I supposed if teleporting armor stands won't work you could try something a bit more creative (though not quite as consistent). Would you be able to give players XP, and then target the orbs they drop when they die? The main problem with this method is that you run the risk of other players picking up the orbs or the orbs moving. If that's fine with you, then you may want to look into it a bit.
1
08/01/2015 11:06 pm
Level 3 : Apprentice Explorer
LDP
LDP's Avatar
I just relized somthing its for SMP so teleporting armor stands may not be the best option lag may also be a problem
1
08/03/2015 4:04 am
Level 43 : Master Musician
GerganaGZ
GerganaGZ's Avatar
I don't know if it will really works like that, but make a scoreboard with deathCount tag, like Jmal116 said, later make it when someone has score of 1 on this scoreboard (when someone die) to make an execute in the moment when he die (make 20 ticks per sec. clock with testfor it) and with this execute to clone the grave or whatever you want to make and to set his score to 0. I didn't test it yet, but maybe will work, maybe will not, idk. Good luck
1
08/01/2015 10:27 pm
Level 33 : Artisan Engineer
Jmal116
Jmal116's Avatar
The problem here is that dead players can't be targeted by commands until they respawn. This means you'll have to keep track of where they are when they're alive. The best way I can think of how to do this is to have an armor stand constantly teleport to them, but I feel like there's got to be a better way.

In any case you could have an scoreboard that is type 'deathCount', and have an armor stand /tp to anyone with a score of 0 on that objective. When they get a score of one, execute a setblock command off that armor stand, then set their death score back to 0.
1
08/01/2015 11:04 pm
Level 3 : Apprentice Explorer
LDP
LDP's Avatar
Thanks will try this I'll post the results soon
1
08/01/2015 9:03 pm
Level 3 : Apprentice Explorer
LDP
LDP's Avatar
Vanilla using redstone and command blocks.
1
08/01/2015 9:00 pm
Level 14 : Journeyman Modder
searchndstroy
searchndstroy's Avatar
Is this a plugin? Mod? Other?
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome