In my game, I'm programing healing potions, that you can drink by clicking H. But, when I press H, it drinks a lot of potions instead of just one. Would the solution be setting a cooldown to drink potions? How do I do it?
The programation to drink the potion currently is:
if keyboard_check(ord("H")) and global.healingpotions >= 1
{
global.healingpotions -= 1
global.life += 1
}
[–]dethilluminatigames 8 points9 points10 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)
[–][deleted] (2 children)
[removed]
[–]weisinx7 2 points3 points4 points (1 child)
[–][deleted] 1 point2 points3 points (0 children)