the mob fires a projectile every 10 seconds

Started by ZenixZet on Thu, 02/04/2021 - 07:12

Topic category: Help with modding (Java Edition)

Last seen on 10:03, 23. Feb 2021
Joined Feb 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
the mob fires a projectile every 10 seconds
Thu, 02/04/2021 - 07:12

I created a mob that attacks with a sword and I want it to shoot a fireball, but when I choose a ranged battle, it shoots too often. How to configure a mob to fire a projectile every ten seconds. This is probably done in the procedure.

Last seen on 13:29, 13. Feb 2022
Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
global var:currTick (number…
Mon, 02/08/2021 - 12:35

global var:currTick (number,GLOBAL_MAP)

procedure 1:(global trigger on each tick)

>>set global currTick (get global currTick+1)

procedure 2:(trigger:on entity tick)

>>if (get global currTick mod 200 is 0)

>>>>fire projectile            PS:working on this step. Hmm...