Detect and set a variable for a player who kill an entity

Started by Ro... on

Topic category: Help with Minecraft modding (Java Edition)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Detect and set a variable for a player who kill an entity

I create some kind of story system for my mod, there is a NPC named Raditz, when the player kill him, he should be able to pass to the next mission, This is how it is supposed to work: When Entity Is Killed
   if RaditzKilled = False and Is Source Entity Player or Player MP
      Set Raditz Killed to True.
it will set the variable to true for the entity, but not the Player, so how can i set to true but for the player?

Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can do this using potion…
Wed, 06/16/2021 - 21:42

You can do this using potion effects. Basically make a procedure that checks for entity deaths and then check if the source entity has a specific effect if true give the source entity a effect that on start sets the effected entities variable in question to something. (There has to be a better way to do this but it might be hard idk)

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
it would be possible if…
Sat, 06/26/2021 - 16:37

it would be possible if there were a When Player Kill Entity Trigger

 

Joined Dec 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
There is a when entity dies…
Sun, 06/27/2021 - 21:03

There is a when entity dies procedure.