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

Started by myxical on

Topic category: Help with Minecraft modding (Java Edition)

Active 10 months ago
Joined May 2021
Points:
696

User statistics:

  • Modifications: 0
  • Forum topics: 36
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 83
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
Active 10 months ago
Joined May 2021
Points:
696

User statistics:

  • Modifications: 0
  • Forum topics: 36
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 83
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)

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

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

well get Source entity

Active 10 months ago
Joined May 2021
Points:
696

User statistics:

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

You're not being very helpful.

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

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

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

Active 10 months ago
Joined May 2021
Points:
696

User statistics:

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

It's fine. Anyone else has the answer?

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1879
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

Active 4 months ago
Joined Oct 2020
Points:
1565

User statistics:

  • Modifications: 0
  • Forum topics: 15
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1879
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?

Active 2 months ago
Joined Mar 2022
Points:
322

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
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.

Active 2 years ago
Joined Feb 2022
Points:
355

User statistics:

  • Modifications: 0
  • Forum topics: 3
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 3
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

Active 1 year ago
Joined Dec 2021
Points:
378

User statistics:

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

Any solutions?

Active 2 months ago
Joined Jun 2023
Points:
190

User statistics:

  • Modifications: 0
  • Forum topics: 13
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 39
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?

Active 10 months ago
Joined May 2021
Points:
696

User statistics:

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

How is this not a feature yet?