like the subject says what kind? Is it just global animations that works or can we do puzzle animation. Like if the avie clicks on something which causes it to rotate a turn?
Was just curious.
from Plasma import *
from PlasmaTypes import *
from PlasmaConstants import *
Activator = ptAttribActivator(1, 'Activator: The clickable')
WarpPoint = ptAtrribSceneobject(2, 'SceneObject: Point object where avatar does animation')
AnimName = ptAttribString(3, 'String: Which animation?') #Check the GlobalAnimation_District_*.prp
#Leave out the gender type!!!
class xAnimateAvatar(ptModifier,):
def __init__(self):
self.id = 7770777
self.version = 0
def OnNotify(self, state, id, events):
if(id == Activator.id and PtWasLocallyNotified(self.key)):
avatar = PtGetLocalAvatar()
#Make sure we are idle
if (avatar.avatar.getCurrentMode() != PtBrainMode.kNonGeneric):
PtDebugPrint('xAnimateAvatar.OnNotify():\tI am busy. Not animating.')
return None
#What kind of anim to run?
if avatar.avatar.getClothingGroup() == kMaleClothingGroup:
animString = 'Male' + AnimName.value
else:
animString = 'Female' + AnimName.value
#Run the anim
PtDebugPrint('xAnimateAvatar.OnNotify():\tRunning animation named ' + animString)
avatar.avatar.oneShot(WarpPoint.value.getKey(), 1, 1, animString, 0, 0)
Actually... With a bit of Python and an Activator in your age, you can make an avatar go through a standard Cyan animation.
Users browsing this forum: No registered users and 36 guests