Topic category: User side tutorials
In this tutorial you will learn how to make a weapon shoot multiple projectiles like a shotgun. to start off this is going to be super easy really its just adding a number in the right place and its done, so lets get to it. First of all you will have to make a procedure like this
you can change the projectile to whatever you want but make sure thats how you want it, so this procedure is going to go with your weapon under when ranged item used.
now here comes the coding part so to edit the code of the procedure with 4 arrows above we need to click the procedure then click the edit.
once you are in you will see something like this
what you want to look for is something like this
this is one of the arrows i had 4 so i would edit 4 but if you want less then thats cool too. so now that you are here outlined in the red is the offset that the arrow will have when it is shot so we want to change this so the arrows wont shoot in the same place and actually be spread out, in the smaller red circle is what i added to change the position of the arrow normally you will just see x y and z but to change them just add + and a number like 0.2 going above to 1 or 2 is super far. so to make more spread arrows i addes +0.1 to x y and z but for each arrow i only chose one to edit for example for the first arrow i did x+0.1 y z and then the second arrow i did y+0.1 I do this to keep every arrow separate. once you edit your arrows i suggest copying all of the code and pasting it somewhere in case you want to do it for more stuff ,once you are finished press save and exit and lock code for mcreator . Now you are done your weapon should now have multiple projectiles, feel like a code lord yet