Right, so I’m having a very simple but very frustrating problem with the Delay Sensor. I have a functional start menu that is used to start a new game or exit the game. The method I’ve used is to have Delay, Mouse Over, and Mouse Left Button sensors connected to an And controller that’s attached to a Set Scene actuator that’s supposed to enter the game into the first Scene. I also have the Mouse Over and Left Button sensors go to a separate And controller connected to a Sound actuator that plays a confirmation sound to let you know you’re starting the game. The problem is that the Delay sensor is being ignored for some reason, meaning the confirmation sound doesn’t have enough time to play as the game just immediately launches into the first playable Scene. The Delay sensor has been tested with pulse mode on and off and has been moved both higher and lower in the node order with the same results. Am I just being stupid in thinking the Delay sensor would override the Left Mouse sensor?
I think you’re misunderstanding how the Delay sensor works. The Delay sensor pretty much behaves just like an Always sensor except it is only triggered and becomes true after delay logic ticks have elapsed (not delay ticks after other sensors have been triggered as you seem to think).
The easiest way to accomplish what you’re trying to do would be to just move the Delay sensor and Scene actuator to a separate controller state. Leave the Mouse sensors on the initial controller layer and have them connect to a state actuator that changes the controller state the layer you have the Delay sensor on. This will cause the delay sensor to only start counting down after its controller state becomes after (which happens after you click on the start button) rather than counting down from the moment the game engine starts.
Try this:
notice that the third controller is Nand. That is important so that the scene will set once the sound has finished playing.
Ah, thank you very much Nicholas. That worked wonderfully.