How do i make a mob that spawns other mobs with a timer

Started by yFire33 on

Topic category: Help with modding (Java Edition)

Last seen on 14:20, 24. Jun 2024
Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i make a mob that spawns other mobs with a timer

Im trying to make a boss that spawns mobs, but it spawns a mob every tick, can i change this? 

Last seen on 21:23, 17. Jun 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It means you used the "on…
Thu, 04/25/2024 - 09:13

It means you used the "on every tick" trigger of your entity. I advise you to create a global variable that store a number.

Each time your procedure is called, you update the variable. If the variable reach a certain number (60 tick for 1 second I believe), then summon the creature you want and reset the variable to 0. Else, just add 1 to your variable and do nothing more.

Last seen on 21:23, 17. Jun 2024
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
PS : Check carefully that…
Thu, 04/25/2024 - 09:15

PS : Check carefully that your variable is global and not local. You have a specific tab on your workbench to define them. If you create a variable directly in the procedure tab, it will be local and not global.