Deal damage in the name of Player/Target entity procedure

Started by LaTortiia on

Topic category: Feature requests and ideas for MCreator

Last seen on 18:52, 20. Jan 2022
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Deal damage in the name of Player/Target entity procedure

First of all I understand this topic already exists, I'm posting this to make a better explanation on the problem and also to bring fresh attention to it. In case I'm asked to delete this post due to the already mentioned subject, I'll do it immediately.

So, in order to deal a specific amount of damage with a range weapon I did the following:

I set power to 15 to get a decent range and bullet speed for my gun.

I set damage to 0 in order to eliminate the bullet damage.

I created a procedure called "when bullet hit living entity" and set it to "deal [2.68] damage [event/target entity] type=generic" 

This procedure deals that exact amount of damage when hitting a entity, which allows me to avoid the whole balancing power and damage hussle.

I have another procedure that detects when entity dies, which goes as follows:

Under world variable "when entity dies" 

If is [source entity] type player or server player = true

Set [source entity] NBT "Money" to get [source entity] NBT "Money" + 100

This adds 100 "Money" to the player every time it kills a entity.

This works fine for normal attacks, but since the gun's damage is not originated from the player, instead it's generated by the damage procedure, the "player kills entity" procedure doesn't work since the source of the damage is not the player.

So a way to making a procedure that basically deals damage in the name of the player would be extremely useful.

Thanks for your attention, I wish all of you a good night.

Last seen on 10:30, 18. Mar 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I know this is a few months…
Tue, 06/14/2022 - 00:09

I know this is a few months old, but since it seems no one has figured it out, I am currently working on this, I haven't yet figured it out but I will and I will update my progress here. If you figured it out, I would love some leads, or an exact method please. Thank you.

Last seen on 10:30, 18. Mar 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Figured it out, I'm turning…
Wed, 06/15/2022 - 12:19

Figured it out, I'm turning my code into a procedure block soon, I figured out how to get the custom damage to be caused indirectly by any living entity you want, allowing it to be automatically registered as player damage for xp and loot using "sourceentity" and counted as a death from a mob or player as well as setting the revenge target.

custom damage linked

Last seen on 20:27, 24. Apr 2024
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm looking forward to it!
Sun, 06/19/2022 - 23:38

I'm looking forward to it!

Last seen on 10:30, 18. Mar 2024
Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm also working on a method…
Tue, 06/21/2022 - 02:19

I'm also working on a method to get the source entity where it would not usually be obtainable, a way to search for an entity (specific or broad) around an entity excluding only the (source) entity, aswell as one that can exclude one or many entities, allowing a complex attack ai to be written and used in the Entity Tick procedure block of custom mobs and potential for much more complex potions and enchantments. I love that Mcreator organises code so well and makes coding so easy, but I aim to exceed the current limitations of Mcreator by ten fold.

Last seen on 17:37, 7. Jan 2023
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Any updates on this?
Fri, 10/14/2022 - 15:27

Any updates on this?

Last seen on 22:04, 19. Apr 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hey, sorry for bumping this,…
Wed, 12/20/2023 - 10:49

Hey, sorry for bumping this, but seems like in your latest plugin version (based on the comment), the procedure to deal damage in the name of other entity is no longer available. Do you know what other plugin that has this, or the other method to do this?

Last seen on 22:04, 19. Apr 2024
Joined May 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, i saw the new 2023.4…
Wed, 12/20/2023 - 11:08

Oh, i saw the new 2023.4 update log, and seems like they added damage source related procedure blocks