Hi,
I am trying to understand and rework the coi_seashell.py script from
ChambersOfIkuturso. I have stripped down the script so that at the
moment it only opens the shell and then the timer closes it again. I
would like to be able to use a similar script in my test world with an
ogre .mesh and .skeleton animation that I'm planning to do using
Fragmotion. I don't understand where the script is finding the file
"Shell_open" because I've searched through the inventory and I can't
find any reference to that file. Under the mesh model directory I can
find a file called "Shell" and under the model animation direction I
can find a file called "ShellAnim". I have also tried replacing the
name "Shell_open" with both "ShellAnim" and "Shell" and the script
stops working. Is it possible that the file "Shell_open" is hidden
somewhere e.g. inside "ShellAnim"?
I tried a quick test using Fragmotion and created a test object which
animated. I imported the .mesh and the .skeleton files and it
animated just as I expected it to. I then tried the Python 3D Model
Animation script in the Wiki which demonstrates how to launch mesh
animations from server python scripts. Even though the mesh animation
did not start, the self.llShout(0,"Custom animation!") was triggered.
In rexPlayMeshAnimation(self.Id,"name_of_animation",0.2,False,False)
do you have to have both self.Id and the name of the animation? Is
self.Id the same as UUid which is the long numbers and letters you get
when you right click on an object in the inventory? I also tried
activating the test 3D model animation using the coi_seashelltest.py
script below (with the correct name of the animation) but
unfortunately that didn't work either. I would really appreciate any
suggestions and different things I could try to make it work.
# realXtend - Chambers of Ikuturso
import rxactor
import rxavatar
import rxtimer
import sys
import clr
import random
import math
class SeaShellTest(rxactor.Actor):
def GetScriptClassName():
return "coi_seashelltest.SeaShellTest"
def EventCreated(self):
super(self.__class__,self).EventCreated()
self.MyTimer = self.CreateRexTimer(15,1)
self.MyTimer.onTimer += self.HandleShellOpenTimer
self.bCanOpen = 1
def EventTouch(self,vAvatar):
vAvatar.rexPlayMeshAnimation(self.Id,"ShellAnim",
0.2,False,False)
self.llShout(0,"Custom animation!")
def EventDestroyed(self):
del self.MyOpenTimer
super(self.__class__,self).EventDestroyed()
def EventTouch(self,vOther):
if(self.bCanOpen):
self.bCanOpen = 0
self.rexPlayMeshAnimation("Shell_open",1.1,False,False)
self.MyOpenTimer.Start()
def HandleShellOpenTimer(self):
self.bCanOpen = 1
Thanks
Turquoise
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/realxtend
http://www.realxtend.org
-~----------~----~----~----~------~----~------~--~---