Delay Sensor Malfunction

ok, I’m trying to play a short sound then switch scenes when it finishes, I was trying to do this via this string of bricks: click-button and play sound+ property sound+1. if property sound+1 +delay 10 positive and 10 negative and Scene Set scene: Next scene

the above plays the sound but the delay never expires.

I tried: click-button and play sound+ property sound+1. if property sound+1 +delay 10 positive and 0 negative and Scene Set scene: Next scene

this time when negative is set to 0 the scene switches without playing the sound instantly upon the click.

I could use some help with the correct brick set-up.

This is something that’s probably more easily accomplished with states.


could you explain a bit more? I’m new to using states.

and I tried what you put above and it just made a delay from scene start not a delay from button press.

My Youtube FPS series covers the basics of states in this video… The stuff you are looking for should be about 11-12 minutes in…

http://www.youtube.com/my_videos_edit?ns=1&video_id=gw1Iz-gIFRg

ok so, here you go
(collision - or always - or whatever) ----------And-----------Assign X 1
property(if X>1 but Less Then 10)-----------And-----------X = X+1
if X=10 ------------------------------------And-----------X=0
_____________________________________—__________Do whatever

I hope this helps!
let me know if you need more help,

here you go, this should help teach you :slight_smile: and anyone else I find !!

Attachments

CodeItAll.blend (522 KB)


Also make sure you understand what the buttons do. TRUE level pulse mode and False are needed most of the time, otherwise it does not usually work,

Make sure the AND controller the delay sensor is attached to is in state 2 (select the second box from the drop down menu on the right side of the controller). Also make sure you start in state 1 by selecting the first box in the “Initial” row.

thanks for the help all, I figured out what I was doing wrong with your help.

before starting the game make sure to set all states back to state 1 otherwise only state 2 is played.