Page 1 of 1

capturing time of user decision

Posted: Fri Aug 20, 2004 3:46 pm
by afsinbulbul
I need to capture the simulation time when a specific user decision is made in a game.
To be more specific, let's say I have a variable called entrance strategy and it can be 0 (meaning don't enter), 1 (enter with this strategy), and 2 (enter with that strategy). As you would guess the initial value is 0 for this variable.In a game, with a user decision, this will change to 1 or 2. To make things more complicated the game interval will be an user input as well. Whole user interface is in Sable. So I would like to capture the time when user makes this selection (from 0 to 1 or 2).
Any ideas?

PS: Initially I decided to pulse time to a variable called entrance time but it did not work. Because I only want to pulse this one time (when entrance strategy entrance strategy becomes 1 or 2 for the first time). Otherwise it keeps changing with the simulation time.

Posted: Fri Aug 20, 2004 6:19 pm
by Wilson
you could try adding an extra variable which is the gaming variable delyaed by one time step. Then create a second new variable using the SAMPLE IF TRUE function to check to see if the current value equals the lagged value of the gaming variable. If it does not, sample TIME.

Posted: Fri Aug 20, 2004 7:36 pm
by afsinbulbul
it worked just fine. thanks Wilson.