![]() |
|
#4
|
|||
|
|||
|
Probably not the most elegant solution, but one that's short and working:
Code:
wind = False
tree.runAction(vizact.animation(1))
def onKeyDown(key):
global wind
if key == " ":
wind = True
tree.runAction(vizact.animation(3))
def onActionEnd(e):
global wind
if e.object is tree:
if wind:
wind = False
else:
anim = vizact.animation(random.choice([1,5,6]))
tree.runAction(anim)
viz.callback(viz.ACTION_END_EVENT,onActionEnd)
viz.callback(viz.KEYDOWN_EVENT, onKeyDown)
|
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Modifying CAF Animations | MissingAFew | Vizard | 5 | 06-11-2015 03:46 PM |
| random coding | Saz | Vizard | 1 | 05-27-2010 05:44 PM |
| random speed and associated coding | Saz | Vizard | 1 | 05-20-2010 04:03 AM |
| Trouble using custom animations for Live Characters | IGoudt | Vizard | 0 | 09-24-2009 06:37 AM |
| problem with female animations | vmonkey | Vizard | 1 | 10-07-2005 10:36 AM |