Topic category: Help with MCreator software
Hello, i had a question on two separate topics, however both are based on the same mob, so i decided to make em both in one;
First, how do i make my entity shoot actual arrows? Or other projectiles of any kind? I know that you can select for them to shoot it in item form, but its not what i need, id like them to shoot a real arrow, the one you'd get from firing bow, is this possible? Ive though several different ways but im not sure if any would work
- Commands; spawning an entity;arrow going in a direction with a certain speed COULD work, but im not sure how to even do such a thing
- Source code editting; Theoretically if i change the projectile type in the code itself, would this be possible?
- Make an entity actually use a bow?: i have no idea how to make this work, but if the entity actually usez their bow then the can probably shoot arrows
Onto the other question, how do i make a procedure that makes a mob do a effect.on something that it hits? I know "Entity attacked" is a thing, but that refers to "When an entity is attacked" and not when "Entity attacks" and i see no "when entity deals damage" or "when entity attacks"
There is also no easy way to apply a selector, outside of commands, all blocks have a " do X to provided entity" and i cant find a way to tell it "Provided entity = attacker" to properly apply a potion effect even using what i know i have "Entity attacked"
Could anyone lend me a hand?
For your first question: It does shoot actual arrows it just textures them
For the second question: you will have to use custom code
Create a bow with the affects you want it to have
Set your entity to be a ranged entity.
Go into the code of the bow and copy code that looks like this (for the player only)
Copy that and go into the code of your entity.
You will see something like:
Go onto the last line where the } is and hit enter about 3 times to move it downward.
paste what you copied from the bow code
Lock the item.
This should work, but I am not certain
Thanks,
Shadow
Well. i tried what you said and McCreator shows compilation errors
this is what my code looks like rn
I think i saw a Tutorial try to search in youtube
i dont see any tutorial,
and im in fact confused by the lack of a "when entity deals damage" procedure,
i dont know if i have an old version or something but i saw some tutorails that have these options, did they remove it??