Topic category: Feature requests and ideas for MCreator
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.
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.
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.
I'm looking forward to it!
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.
Any updates on this?
My plugin has been outclassed by another. Though I may still release it as it has features this plugin doesn't offer.
https://mcreator.net/plugin/93380/plugin-damage-source-plugin-forge-1192
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?
Oh, i saw the new 2023.4 update log, and seems like they added damage source related procedure blocks