How to set the damage in a procedure to player's damage?

Started by myxical on

Topic category: Help with modding (Java Edition)

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to set the damage in a procedure to player's damage?
Sat, 10/09/2021 - 21:11 (edited)

What I mean is when an entity dies to some custom damage I want to set who killed the entity.
Example: player performs a special aoe attack and deals custom damage to surrounding mobs, but mob kills don't count as player kills (doesn't show in statistics that you killed that mob in statistics, no player kill only loot dropped, no experience dropped)

How do I do that?

Oh also I noticed when you first hit the mob and then deal the custom damage the localization changes to death.attack.name.player. How do I force it to always be .player?

Edit: How do I also make it so it doesn't pass through armor?

Scratch all of that. I found out there's a death.attack.player in vanilla. How do I apply it to my procedure? I don't see it on the list.

Edited by myxical on Sat, 10/09/2021 - 21:11
Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Not what I'm looking for…
Sun, 10/10/2021 - 08:55

Not what I'm looking for. Also rude.
I know how custom death messages and custom damage works. I just want it to be from a player, so it's a player kill (xp drops, kill counts in statistics)

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
well get Source entity
Sun, 10/10/2021 - 16:07

well get Source entity

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're not being very…
Mon, 10/11/2021 - 16:31

You're not being very helpful.

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm sorry, but that is what…
Mon, 10/11/2021 - 16:36

I'm sorry, but that is what I thought you needed

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It's fine. Anyone else has…
Thu, 10/14/2021 - 17:08

It's fine. Anyone else has the answer?

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
there is a procedure block…
Thu, 10/14/2021 - 17:26

there is a procedure block called Deal Custom Damage type: death.attack.YOUR_DAMAGE

basically to make it you need to go to Location Tab and make a new death.attack.NAME

and on the second bar make something like PLAYER_CODE died from NAME

Last seen on 04:28, 26. Jan 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
okay scratch that too, just…
Thu, 10/14/2021 - 17:32

okay scratch that too, just re-read the thing, basically what you want is for example, PlayerA killed PlayerB from DAMAGE right?

Last seen on 17:53, 7. Jan 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
No I want, and i think…
Tue, 03/29/2022 - 18:46

No

I want, and i think mystical wanted to know aswell, how we could deal damage in a procedure, and then the Player(Sourceentity) getting the kill award (Not just a death massage, but being the SOURCEENTITY in the Entities "When entity dies" Procedure).

My enitity has a Procedure that when it dies, gives the Killer(Player) EXP for a custom leveling system i made. This does NOT work if the entity wasn't killed by the Player.

Problem is:

The "deal damage" and "deal custom damage localized as death attack blah blah blah" do NOT COUNT as if the Player hit the entity, so the Player never gets the custom EXP(kill award) he should.

Which is bad for my mod, so im searching for a solution.

Last seen on 00:01, 23. May 2022
Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Gonna bump this cos I had…
Mon, 05/02/2022 - 22:45

Gonna bump this cos I had the same issue. So far the easiest way I could see to do this is to modify the 'amount' variable that is given with the 'entity attacked' trigger but I haven't figured that out

Last seen on 01:03, 1. Jul 2023
Joined Dec 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Any solutions?
Fri, 12/23/2022 - 01:09

Any solutions?

Last seen on 21:01, 27. Mar 2024
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Rotzmauz, I feel like what…
Sun, 06/18/2023 - 19:36

Rotzmauz, I feel like what you want can be explained better because even I'm confused. To my understanding, you're saying you are making a procedure that instantly deals damage to a mob or whatever and then you want the player to reap the rewards?

I have two questions, you talk about a custom damage, so I'm assuming the custom damage move is it's own procedure. If that is the case, could you not set the global event to entity attacked and make the target entity the mob that you killed and give the xp or whatever it is you are rewarding the player with to the source entity?

Last seen on 23:47, 20. Jan 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How is this not a feature…
Tue, 08/08/2023 - 11:28

How is this not a feature yet?