(Tutorial) How to change a Entity speed shooting (Rapid-Fire)

Started by RealVendomil on

Topic category: User side tutorials

Joined Jan 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
(Tutorial) How to change a Entity speed shooting (Rapid-Fire)
Sat, 04/10/2021 - 21:24 (edited)

Step 1. Make a Entity with ranged item.

Step 2. Go to "Code Editor"

Step 3. Find or on right side find "registerGoals"

---

this.goalSelector.addGoal(1, new RangedAttackGoal(this, 1.25, 5, 5) {

The first number 5 (20 Default) is tick for a shooting. 5 tick is rapid fire. And if is more than 20 ticks, it will be slower.

20 Ticks is 1 Second

Edited by RealVendomil on Sat, 04/10/2021 - 21:24
Joined Jan 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Very Helpful
Mon, 07/12/2021 - 13:54

Very Helpful

Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks, is there any way in…
Tue, 10/12/2021 - 17:08

Thanks, is there any way in the code to change the accuracy? Made a turret and it just shoots all over the place.