Fireball Cooldown (solved)

Started by OOOGABOOOGA on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Fireball Cooldown (solved)
Mon, 04/21/2025 - 15:19 (edited)

So im making a mod that has a custom ghast boss, but when it shoots the fireballs they have no cooldown and I cant figure out how to give it a cooldown. (Solved)

Edited by OOOGABOOOGA on Mon, 04/21/2025 - 15:19
Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Absolutely! Here's your…
Sun, 04/20/2025 - 18:20

Absolutely! Here's your tutorial rewritten super simply—like you're walking through it with a curious toddler who just learned what a computer is. Every step is broken down clearly, with explanations like, “Click the blue block” or “Grab the number 0 block like a toy.” I’ll also format it so it’s friendly to read and easy to follow.

How to Make a Simple Countdown Timer in MCreator

(For very, very new beginners – like beginner level!)

Step 1: Create the Countdown Number

  1. Go to the top menu where the buttons are.
  2. Click the “Variables” tab (it looks like a puzzle piece).
  3. Click the “+ Add new variable” button.
  4. A new window pops up. Do this:
    • Name your variable something like countdownnumber (pick a name that no other mod is using).
    • Set type to: Number
    • Set scope to: Global: World
  5. Click Save.

Step 2: Make the Timer Work Every Tick

  1. Go back to the “Elements” screen.
  2. Click the green “+” button.
  3. Choose “Procedure” from the list.
  4. Name it something like countdowntimer.
  5. In the big green box, click where it says “No trigger selected.”
  6. Scroll all the way to the bottom and pick:
    On World Tick Update

Step 3: Build the Countdown Blocks

First, Set Up the IF Condition

  1. Go to the “Flow Control” tab and grab the block that says:
    if do else
  2. Go to the “Custom Variables” tab:
    • Grab get number [global]
    • Grab set number [global]
  3. Go to “Logic” tab and grab the block that says = (equals).
  4. Now build your condition like this:
    • Put get number Global: countdownnumber on the left side of the =
    • Put a 0 (zero) block from the Math tab on the right side
    • Put the whole = block inside the IF’s test area (at the top of the IF block)

Now Fill in the DO and ELSE Parts

  1. Inside the DO section, put a set number Global: countdownnumber block
    • Set it to 0 using the number block from Math
  2. Click the settings gear on the IF block and drag the “else” block over. Then click the gear again to close.
  3. Inside the ELSE section:
    • Duplicate the set number block from the DO
    • Duplicate the get number block
    • Put the duplicated get number inside a math block that says - (minus)
      • On the left of the - is your get number
      • On the right is a new number block (this is how fast the timer ticks down — use 1 or 20 or even 1.5)
    • Put the whole thing inside your ELSE’s set number block

Step 4: Set How Long the Timer Runs

In the DO section, where you set the number to 0, change it to the tick time you want:

  • 20 ticks = 1 second
  • 300 ticks = 15 seconds
  • So if you want a 15-second countdown, set the number to 300

You’re Done!

You now have a global countdown that:

  • Starts at a number (like 300)
  • Goes down by 1 every tick
  • Stops at 0

You can also show this number using overlays or text elements if you want a cool countdown on screen!

Now when you make your ghast Procedure, use the timer and do if timer = 0, then do your ghast procedure. 

 

Make sure timer says yourtimeryoucreated

Easy to import file

https://discord.com/channels/304339452925313024/304339452925313024/1363579302704185674

 

Joined Apr 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@SkylieTuff thanks it worked!
Mon, 04/21/2025 - 14:27

@SkylieTuff thanks it worked!

Joined Mar 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're welcome. Hope it was…
Sat, 05/03/2025 - 20:18

You're welcome. Hope it was easy to understand and helped you know more about timers.