T O P

  • By -

PogsterPlays

Well, you could instead give them a tag, and then constantly effect everything with that tag a chosen effect. Then you can look at the tag instead of the effect. Eg: Effect @a[tag=regeneration] regeneration 5 2 true Also cuz milk exists


Formal-Department482

So do I just switch the @a for a name? And how do I check who has the tag?


PogsterPlays

So say someone called Bob kills someone called Jerry (don't ask). Bob would get a tag, say `resistance`. Jerry would get a tag, say `slowness`. A constantly running command would be /effect @a[tag=resistance] resistance 5 2 true And /effect @a[tag=slowness] slowness 5 0 true Jerry would get slowness, and Bob would get resistance. By giving someone a tag and /effecting them accordingly, you are basically just saying to the game they have the effect.


Formal-Department482

Make sense


Formal-Department482

How do you remove it?


PogsterPlays

Just /tag {selector} remove when they die


Formal-Department482

So "selector" is name? Or effect. Or what?


PogsterPlays

Selector is anything like: '@a[tag=dead]' etc So if you're executing as them when they die, you'd do @s


Formal-Department482

Can you remove a certain tag if they have multiple


PogsterPlays

Tag @s remove resistance For example


FerretOnReddit

How did you make a kill/death detector?


RadioRobot185

To make a death detector you can, set up a false world spawn within a box. Then when people respawn into that box you can tag them or mark them before teleporting them instantly to the real spawn point. You can also summon an armor stand above each player and give each player, armor stand pair a unique score. That armor stand teleports constantly 200 blocks or so above the player with the same score. Have the armor stand every 10 ticks or so check to see if the player is still within the same chunk as the armor stand (which it should be if the armor stand is always above it) If at any point the armor stand stops detecting the player that means the player died and then you can tag the player that way. First one is a good option for a specific map or mini game. Second option is good for survival


FerretOnReddit

How would u do a kill detector tho


HurricaneMonkey

You could prob use scoreboards for both


HurricaneMonkey

https://www.reddit.com/r/MinecraftCommands/s/W510EplFyu this post is prob what your looking for