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

Started by Ro... on

Topic category: Help with modding (Java Edition)

Last seen on 05:41, 29. Mar 2024
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?

Last seen on 06:28, 29. Mar 2024
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)

Last seen on 05:41, 29. Mar 2024
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

 

Last seen on 17:15, 28. Mar 2024
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.