How to make custom projectile dispersion

Started by zxnm on Sat, 06/12/2021 - 02:00

Topic category: Help with MCreator software

Last seen on 17:00, 30. Jun 2021
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make custom projectile dispersion
Sat, 06/12/2021 - 02:00

i having a hard time making custom projectile spread 

tried to make them to work out as a shotgun but failed 

and coding really isn't my thing (i tried to edit the code myself but failed)

help
 

Last seen on 17:33, 27. Jul 2021
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
in the entity management tab…
Thu, 06/17/2021 - 14:55

in the entity management tab, there's a block called "Shoot ranged item as {Event/target entity} with power: [1] damage: [5] knockback: [5] type: [Arrow]" which fires the chosen projectile from the chosen entity. If your shotgun is a ranged item element, make a When ranged item used procedure and put a "shoot ranged item" block inside a "repeat [5] times" block. For a more accurate spread, first store the player's pitch and yaw in local variables, then every time a projectile is fired, alter the player's pitch and yaw by a random value. After all projectiles have been fired, set the player's pitch and yaw to the values that were stored earlier.

Hope you understand the jargon that I have typed.

Last seen on 17:00, 30. Jun 2021
Joined Jul 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
thanks
Thu, 06/17/2021 - 22:38

thanks