I was trying to figure out how to add a delay to my BGE game so that it has a cooldown, like when using something.
The only solution I found is this: if you click the button at the exact same tic every 60 tics it will work but not other tics.
Blender Stack Exchange is a question and answer site for people who use Blender to create 3D graphics, animations, or games. It only takes a minute to sign up.Sign up to join this community
There are a few ways of creating a delay. I have two* different ways below.
One simple way is to use a timer property, and reset the timer each time our event is triggered.
I have a game property named "timer" and it is a timer type of property.
The Keyboard sensor and Action actuator are just so my object does something. You only need to add a Property sensor and a Property actuator.
The Property actuator needs to be set to assign a value of zero, this is how the timer gets reset.
Now the Property sensor checks to see if the timer is greater then 1.5 seconds, when it is it will send a True plus to the And controller. If it is not then you will not be able to trigger your action until the timer counts high enough.
timer >=1.5 checks if the game property "timer" is greater then or equal to 1.5; doing it this way there is no need for the Property sensor.
* It is the exact same method, just with sightly different logic bricks.