WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Sit, stay, wait? (https://forum.worldviz.com/showthread.php?t=2043)

EnvisMJ 05-20-2009 01:56 PM

Sit, stay, wait?
 
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


All times are GMT -7. The time now is 01:32 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC