I am creating a game where you have to destroy a tower using a catapult. I have programmed the logic system so that when i press the space key it will launch a ball. At the moment it will launch it every time I hit space. This is not what I want it to do, I want it to not launch again until 90 frames. Is this possible in the logic system or will I have to use python?
Add a timer property or set up a property that is increased by one at each frame (always sensor + property actuator).
Now you can add a sensor that checks the property (or timer property) to be not within a range (0-90 ). When this sensor fires True AND the space key sensor fires True, activate your katapult and reset the proeprty to zero.
Thank you for the quick reply Monster, however I am still a bit of a noob in the game engine and I can’t get it to work. Could you post an example or explain it more thorough please.
On your catapult, use a State actuator in addition to your Add Object actuator. Switch the state to an unused one (the second one, for example).
Select the other state, and use a delay sensor, set to 90 frames, and link it to another State actuator. Have that state actuator switch back to the original state.