WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-25-2010, 07:17 AM
IGoudt IGoudt is offline
Member
 
Join Date: Sep 2009
Posts: 20
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)
Another question I would like to ask is what 'pools' are with respect to actions. The helpfile is not totally clear on that. Does vizard run multiple pools on an object simultaneously or after each other (first all actions in pool
1, then in 2, etc..)

Thanks!
Reply With Quote
  #2  
Old 01-25-2010, 10:55 AM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,471
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.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -7. The time now is 02:47 AM.


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