PDA

View Full Version : Sit, stay, wait?


EnvisMJ
05-20-2009, 01:56 PM
So I'm writing a little 'proof of concept' game in vizard, reminiscent of the old memory card games.
The logic side of it is working fine, however, I can't seem to get a 'wait' or delay command that works properly.

It is supposed to: when you select the second card, it should hide the card to reveal the object, wait one second to allow the user to view the object behind the card, then: hide both objects if they match, or reveal the cards to hide the objects again.

I've tried a variety of wait and sleep commands and they all seem to result in one of two situations.

A. It has no apparent effect on the program, the objects are hidden (or cards replaced if wrong) executes as soon as you click the second 'card'

B. When you click the second card, instead of hiding the second card then waiting. It just waits, then hides everything at once.

This is probably going to turn out to be something ridiculously simple, but we've had 4 people puzzled over this problem already.

Gladsomebeast
05-20-2009, 04:36 PM
Use the viztask module so you can "sleep" in a function.

http://www.worldviz.com/vizhelp/VizTask_basics.htm