I managed to get a reset button to work today with the current prototype
I was having trouble last time with the dialogue box of the oxygen tank interfering with the reset. I found another LSL wiki site (added it to the link bank for you guys to check out ~ see down the bottom of the link bank) that explained the llListen() function and the listen event handler a bit better.
Now both the oxygen tank and the patient catch the reset called from the reset button correctly and basically they reset when you click on the reset box.
I imagine that we will have a separate reset for each scenario (and therefore use a separate reset channel for each -- so that the scripts in different scenarios aren't reset accidentally from different levels
Obviously each new object that is added to the scenario needs to have the catch for the reset button's call else that particular object wont reset.
Try it out and you will see that it resets both the oxygen tank to off and patient to default coughing state.
I have also updated the code bank with the new versions of the scripts.
WARNING when copy pasting into the code bank make sure you double click the cell that you are pasting into first. Otherwise it does this really weird thing where each new line in what you have copied goes into a new row, you end up with a whole lot of new rows with one line of code in each. So remember double click the cell then paste in the code
Subscribe to:
Post Comments (Atom)
1 comment:
cheers thanks ben. Looking at the code it's pretty much exactly what we'll need for the patients monitor too.
Post a Comment