#1
|
|||
|
|||
about triggering action
Is that possible to set up something like this:
Firstly I press keyboard "A" after that I press keyboard "C" Then one action is triggered. And this two step is in a order, the first one has to be activated first them do the second one, after that the action is triggered. Is that any sample code for this? |
#2
|
|||
|
|||
The input is not constricted to keyboard, also for other input
|
#3
|
|||
|
|||
You could use a viztask function to wait for one event and then another before an action is triggered. The following code shows this with key events:
Code:
import viz import viztask import vizact viz.go() piazza = viz.addChild('piazza.osgb') avatar = viz.addAvatar('vcc_male2.cfg',pos=[-3,0,5]) avatar.state(1) walk = vizact.walkTo([3,0,5]) viz.move([0,0,-4]) def triggerAction(): yield viztask.waitKeyDown('a') yield viztask.waitKeyDown('c') avatar.runAction(walk) viztask.schedule( triggerAction() ) |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
help with triggering an action | jelly | Vizard | 0 | 04-08-2016 07:44 AM |
Walking action of avatars | SivaKartheek | Vizard | 3 | 01-08-2016 09:17 AM |
walking action of avatars | SivaKartheek | Vizard | 1 | 12-14-2015 10:58 PM |
vizact move action | andreionutz | Vizard | 13 | 11-19-2014 02:54 AM |
adding more than 1 action for avatar animation slider control | yak | Vizard | 0 | 07-21-2009 11:22 AM |