how to connect 2 players so if one dies the other one does aswell

Started by PARJ4 on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to connect 2 players so if one dies the other one does aswell

basically the title i want to connect 2 players so if one dies the other one will also. I am also on 2044.4 of mcreator don't know if that really matters but yea.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Depends on the method. If…
Fri, 03/27/2026 - 13:33

Depends on the method. If using a custom item, one player right clicks with the item on the other. The item is removed and the players display name is set as a text variable on each player. You can also use a logic variable to specify whether the player has used an item/ie connected to another player. Using target/event entity and source entity to get the names and then apply the opposite names as text variables. Then make a procedure on entity dies, check for type player, then check for logic connected = true, if so then run command with text, /kill [get text variable].

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry i haven't done…
Fri, 03/27/2026 - 19:06

sorry i haven't done anything with text variables do you think you could send a picture of what you mean?

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
When I said "text variable"…
Fri, 03/27/2026 - 20:33

When I said "text variable" I meant [string] variable type. Go to global variables and create a new variable, set type to string. That holds text. Here's an example of procedures:

https://imgbox.com/Jk3w68MO

Second procedure would be on player [right clicks on entity] with item.

Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
*On the second procedure,…
Fri, 03/27/2026 - 20:34

*On the second procedure, the second event/target entity should be source entity*

Joined Jul 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thank you so much it worked …
Fri, 03/27/2026 - 21:21

thank you so much it worked