• Hey! Register here to create your account, engage with the community, and talk about what is new!

add delay between projectiles.

matsvanetten

New member
Joined
Feb 8, 2021
Messages
2
Reaction score
0
hey, i want to make a rod that when right clicked it shoots a fireball. i already made it so it shoots a fireball but i don't want players to spam it. i want like a 3 second delay between the shots, how do i do that?
 

Jeremaster

Owner
Owner
Joined
Aug 16, 2020
Messages
92
Reaction score
131
One easy way would be to use item cooldowns (like how ender pearls have a cooldown in vanilla).

Before launching the fireball, add an "If Player: Item is Not on Cooldown" block and put the rod in the chest. Then, if the item is not on cooldown, launch the fireball and use "Player Action: Set Item Cooldown" to set a cooldown. In the chest, you'll put the rod as well as a number, which is the cooldown measured in ticks. There are 20 ticks in 1 second.
 

stinkey

Forum adept
Joined
Sep 8, 2020
Messages
225
Reaction score
74
One easy way would be to use item cooldowns (like how ender pearls have a cooldown in vanilla).

Before launching the fireball, add an "If Player: Item is Not on Cooldown" block and put the rod in the chest. Then, if the item is not on cooldown, launch the fireball and use "Player Action: Set Item Cooldown" to set a cooldown. In the chest, you'll put the rod as well as a number, which is the cooldown measured in ticks. There are 20 ticks in 1 second.
jere tutorial...
 
Top Bottom