what kind of animations works atm?

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

what kind of animations works atm?

Postby Goofy » Sun Dec 23, 2007 11:02 pm

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. :roll:
We keep moving forward,
openning up new doors and doing new things,
Because we're curious... and curiosity keeps
leading us down new paths

Walt Disney

Keep moving forward
Goofy
 
Posts: 162
Joined: Mon Oct 01, 2007 8:51 pm

Re: what kind of animations works atm?

Postby Paradox » Sun Dec 23, 2007 11:04 pm

Right now... no animation :P

You can do some really horrible, really slow animations with Python (rotations and simple translations).
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: what kind of animations works atm?

Postby Jennifer_P » Mon Dec 24, 2007 1:16 am

Is that how the snowflakes in your Age work, Paradox? A sort of spiral down simultaneous translation/rotation...? And do you get any lag with that?
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: what kind of animations works atm?

Postby Paradox » Mon Dec 24, 2007 1:54 am

No snowflakes yet. Those will be hacked together using the same particle systems as Cyan's Ages... I just need to figure out how those work >.>
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: what kind of animations works atm?

Postby Jennifer_P » Mon Dec 24, 2007 11:50 am

Oh whoops, I thought I recalled seeing thinly falling flakes in your snow Age. Must've been my imagination. :)
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: what kind of animations works atm?

Postby Tsar Hoikas » Mon Dec 24, 2007 6:09 pm

Actually... With a bit of Python and an Activator in your age, you can make an avatar go through a standard Cyan animation.

Code: Select all
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)


As for documentation for this code:

You will need to provide 3 arguments in the plPythonFileMod for this script. First, you will have the ActivatorConditionalObject that acts as a toggle. You will then need a point object for where you want the avatar to stand when the animation is played. Finally, you will provide the name for the animation, which can be acquired by looking through the "GlobalAnimation_District_*.prp" prp files. You should not include the gender name. For example, if I wanted to to run the "MaleGroundImpact" or "FemaleGroundImpact" animation, then I would specify "GroundImpact" as the animation name.

Hope that makes sense :)
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Re: what kind of animations works atm?

Postby Paradox » Mon Dec 24, 2007 6:27 pm

Warning: untested and very speculative rambling ahead!

Seek points have interested me for the longest time. They make animations look nice and work properly. When Adam asked about them for his code, I started looking into them more closely.

(All information is for the standard "click" animation, such as journey cloths and doors)
You need a point object to be where the avatar will stand. This should be level with the ground.
The point object should be 2 blender units away from the clickable object (the point where the avatar's hand should touch).
The clickable object needs to be slightly more than 4 Blender units above the ground/seek point.

Now I just need to make some really fancy stuff happen... :P
Paradox
 
Posts: 1290
Joined: Fri Sep 28, 2007 6:48 pm
Location: Canada

Re: what kind of animations works atm?

Postby Jennifer_P » Tue Dec 25, 2007 1:00 am

You know, I always wondered how seek points worked (generally while I was waiting in annoyance for the avatar to finish shuffling around in 3rd person so that I could get back to my theoretically locked-in-first-person POV). It seemed like it would be pretty complicated to move the avatar to just the right place and orientation so that it could perform an animation, but thinking of it now I suppose it's not too complicated in theory.

Actually... With a bit of Python and an Activator in your age, you can make an avatar go through a standard Cyan animation.

So are activators all types of objects which initiate animations (i.e., benches or footpads), or just the specific 2 out, 4 up objects? Or do the standard Cyan animations not include footpad pressing and sitting...?
Jennifer_P
 
Posts: 729
Joined: Fri Sep 28, 2007 10:54 pm

Re: what kind of animations works atm?

Postby Trylon » Tue Dec 25, 2007 1:50 am

Very interesting :)
One day I ran through the cleft for the fiftieth time, and found that uru held no peace for me anymore.
User avatar
Trylon
 
Posts: 1446
Joined: Fri Sep 28, 2007 11:08 pm
Location: Gone from Uru

Re: what kind of animations works atm?

Postby Tsar Hoikas » Tue Dec 25, 2007 1:57 pm

An activator is a specific type of object in a PRP file. See "ActivatorConditionalObject" objects in PRPExplorer for more info, PRPExplorer 0.6 has an editor for them. What they do it tell Uru that an object is clickable or sit silently waiting for your avatar to somehow manipulate it. Once you've triggered the activator by clicking, entering a region, etc. It sends a message to other objects that will begin doing some fun things...

Hopefully that explanation suffices.
Image
Tsar Hoikas
Councilor of Technical Direction
 
Posts: 2180
Joined: Fri Nov 16, 2007 9:45 pm
Location: South Georgia

Next

Return to Scripting

Who is online

Users browsing this forum: No registered users and 36 guests