Hi,
Currently, the only way to do this is to use the
avatar.speed command. When you set the speed of an avatar to 0, it will effectively freeze it.
I wrote a very short script that shows how to do this. Press the spacebar to activate the animation of the avatar being shot. Once the animation is activated, a timer will be set to expire when the animation is over. The timer will then freeze the avatar.
Code:
import viz
viz.go()
FREEZE_AVATAR = 0
male = viz.add('male.cfg')
male.rotate(180,0,0)
viz.move(0,0,-8)
def onkeydown(key):
if key == ' ':
#Perform the action
male.act(7)
#Start a timer to freeze the avatar when the action is over
viz.starttimer(FREEZE_AVATAR,male.getduration(7))
viz.callback(viz.KEYDOWN_EVENT,onkeydown)
def ontimer(num):
if num == FREEZE_AVATAR:
#Freeze the avatar
male.speed(0)
viz.callback(viz.TIMER_EVENT,ontimer)
Let me know if you need any more help