#1
|
|||
|
|||
adding actions in front of actionlist
Hello,
I know that {avatar}.addAction adds an action pending in the end of an actionqueue, waiting to get handled. Now, in my project I would like to edit the pending actionqueue, in particular: add an extra action in front of the actionlist. For example I would have this scenario: avatar.addAction(walkToBar) avatar.addAction(orderAdrink) avatar.addAction(drink) but, considering above scenario, I would like to be able to edit this on the fly (by A.I. of the avatar) to for example: avatar.addAction(walkToBar) avatar.addAction(orderAdrink) avatar.addAction(drink) while the avatar is performing the walktoBar action, but on his path he meets a friend. Then I would like to change his actionqueue to: - talk with friend - walk to bar (continue the walk or restart a walk action) - order a drink - drink Is this possible in the current node3d/avatar implementation, or would I have to change my already inherited avatar class by extending it with a new sort of InsertAction()? Pseudo: Code:
todoActions = avatar.getActionList() avatar.clearActions() avatar.addAction(newAction) avatar.addAction(todoActions) 1, then in 2, etc..) Thanks! |
#2
|
|||
|
|||
You would need to do something like your InsertAction code there and call a clearActions or runAction command and then add your list of actions again.
The different pools will be executed simultaneously so you can have actions running in parallel on an object. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trouble with adding actions | vijaykiran | Vizard | 0 | 10-05-2009 03:18 PM |
adding more than 1 action for avatar animation slider control | yak | Vizard | 0 | 07-21-2009 11:22 AM |
How to make avatar's eyes to blink when speaking | michelcm3 | Vizard | 12 | 01-15-2008 08:48 AM |
Weird lagging/choppiness when avatars perform actions | vjonshih | Vizard | 8 | 11-30-2004 04:08 PM |