Difference between revisions of "Avatar Animations List"

(Alcscripts)
(new info about markers added)
Line 222: Line 222:
 
An avatar animation is not the main action for a clickable. Usually we are opening a door, playing a sound, activating a Python script etc. However, the main action should always wait until the avatar animation has finished. In order to make it so we can add a callback message.
 
An avatar animation is not the main action for a clickable. Usually we are opening a door, playing a sound, activating a Python script etc. However, the main action should always wait until the avatar animation has finished. In order to make it so we can add a callback message.
  
A callback message needs two references: a marker and a receiver. The marker in this case is the avatar animation. The receiver is the responder which started it (hence callback). When the animation finishes the responder receives the callback message and continues with the next command.
+
A callback message needs two references: a marker and a receiver. The marker is a name defined within the avatar animation (a list of valid marker names for each global avatar animation will be provided soon). The receiver is the responder which started it (hence callback). When the animation finishes the responder receives the callback message and continues with the next command.
  
In order for commands to wait their waiton value must be set. By default the waiton value is -1 which means "do not wait". A command with the waiton value set will not be executed until the message it specifies has been received. This will block the execution of the following commands as well.
+
In order for a command to wait its waiton value must be set. By default the waiton value is -1 which means "do not wait". A value of 0 (or any other number > 0) means "wait". The waiton value must match the waittocmd key.
  
 +
A command with the waiton value set will not be executed until the message it specifies has been received. This will block the execution of the following commands as well. The specified message is the waittocmd msg value which must match the user id of the callback message that should be received by the responder.
  
Here is the same example as shown previously but this time with a callback added to play a sound after the avatar animation has finished.
+
Confused? You won't be after the next example. The Alcscript here is basically the same as shown previously but this time with a callback added to play a sound after the avatar animation has finished.
  
 
<pre>
 
<pre>
Line 262: Line 263:
 
                               - oneshotmod:<seek point name>
 
                               - oneshotmod:<seek point name>
 
                             callbacks:
 
                             callbacks:
                               - marker: <avatar animation name>
+
                               - marker: <avatar animation marker name>
 
                                 receiver: respondermod:<responder name>
 
                                 receiver: respondermod:<responder name>
 
                                 user: 0
 
                                 user: 0
Line 283: Line 284:
 
                   - detecttrigger
 
                   - detecttrigger
 
</pre>
 
</pre>
 
Notice that there is also a user value in this example. This is the user id of the callback message that should be received by the responder.
 

Revision as of 13:21, 24 September 2008

Introduction

WARNING: this article is a work in progress, it is not complete, use it at your own risk.


The 'OneShotMod' avatar animations are all the 'advanced' avatar animations that are triggered by a script. They are mostly used when the avatar interact with an object: touching a book, pushing a button, pulling a lever etc.. They also can be used for other things like entering the elevators in Garrison. Those animations are important for all interactions in an Age and if they are used well they can enhance it a lot.

Those animations must be triggered through Alcscript. However those animations are 'fixed', which means that the avatar will always plays the exact same animation, regarless of where the interactive object is. For example if you want the avatar to touch a book using the standard linking book animation but you create the book right on the ground, the avatar will 'miss' it. So, in order that those animations look right the objects must be made to fit the animations; they must have a certain size, be at a certain height... etc. This list goes through some of the most common animations and the required objects, and tries to give all needed information to use them correctly.

Also on this page is a Blender scene containing a visual reference for all those animations.


Animations list

Important note: All of the dimensions given for the objects are not exact, that is because in the Cyan Ages they change a little bit from Age to Age and are never exactly the same. That is not a problem because most of these don't need to be extremely precise, and a couple inches don't make much of a difference. The dimensions given here have been averaged and give a good idea of how to set up your objects.

Also, remember that those animations are only for the avatar, if you want to animate some of the objects (levers, buttons, etc) you will have to do it yourself. For small objects (buttons especially) that may look OK if they are not animated; but for larger objects, you definitely need to (which can be difficult if you want to properly synchronize it with the avatar animation).

Another important note: You can only use global animations. This list also mentions age specific animations, but these will not work unless you import them first (advanced users only: not covered by this tutorial).

Linking book

This is the regular 'Touch the linking book panel' animation used for most books. The book linking panel must be at 3.4 units above the ground.
Animation: "GlobalAnimations_LinkOut"

Door button

This is the regular button animation used for most doors (like the Relto hut door) but it is can also used for other things like for touching the Journey cloths, or any action that requires a large button on a wall.
The button must be around 3.6 units above the ground.
Animation: "GlobalAnimations_District_DoorButtonTouch"

'Flat' button

This one is for the small buttons on pedestals found in many Uru Ages (the Hood light buttons on the bridge, the Teledahn elevator, the Gira lanterns in the caves, etc)
The button must be around 3.5 units above the ground.
Animation: "GlobalAnimations_District_ButtonTouch"

Sitting regions

Use for all the chairs and benches, those don't actually require animations, they are used automatically like the ladders. They still require the object to be at exactly 2 unis above the ground, and at least 1.4 unit large.

Also if you want to have a table or a desk near it, make sure that it is at least 1 unit above the chair.

Wall lever

This is the regular 'small lever on the wall' used in the Relto hut for the window, in the teledahn office etc.. There are two animations depending whether the lever is on the 'up' or 'down' position.
For the 'down' position the lever handle must be around 3.8 units above the ground, for the 'Up' position it is around 4.3
Animation: "GlobalAnimations_BlindsLeverUp"
Animation: "GlobalAnimations_BlindsLeverDown"

Scopes

All scopes in Uru works pretty much the same way and they use several animations. First the avatar has to grab the scope by the handles, then it holds it as long as it uses it, and then finally it releases it.
Animation: "GlobalAnimations_ScopeGrab"
Animation: "GlobalAnimations_ScopeHold"
Animation: "GlobalAnimations_ScopeRelease"

Revolving doors

Most doors in Uru are sliding doors, however there is a regular non-sliding door, which is only used in the Teledahn warShroom. It requires some pretty specific dimensions (size of the door, size and position of the handle on the door etc). Also it causes various other issues, most notably in a multi-player environment you can slam the door in someone else's face. So it is not very easy to use; which is probably why it wasn't used much in Uru Ages.
For the full dimensions of this object look at the blender scene at the end of this article.
There are two animations depending on which side of the door the avatar is.
Animation: "Teledahn_NoxiousCaveDoorPullOpen"
Animation: "Teledahn_NoxiousCaveDoorPushOpen"

Relto Bahro Poles Book

This is a slight variant of the common Linking Book animation, here the avatar has to kneel to use touch the book. In Uru this is mostly used for the Relto Bahro poles books, and for most of the Bahro stones. This can be useful if you want to have a book near the ground. Book panel must be at 2 units above the ground.
Animation: "GlobalAnimations_FishBookLinkOut ???"


More animations

There are many other animations in Uru, some of which are listed here, and if you want to add more informations and move that to the main section of this document, please do it (this is a wiki after all ;) ). Also there are more animations for the objects listed previously, some of those can help you in your Age or give you ideas, so don't hesitate to have a look at the Uru/Dat folder for a list of all the animations (look for the files with 'Female' or 'Male' in their names).


Pedal
Used for the Cleft bucket, the Eder Gira vents, the Teledahn elevator brake etc.
Animation: "GlobalAnimations_StepOnFloorPlate"


Floor lever
The big lever near the Teledahn bucket, or in the Kadish Pillars puzzle etc
Animation: "GlobalAnimations_FloorLeverA"??


Big floor lever (aka Clutch lever)
This animation is only used in Teledahn for the 3 levers around 'solar panel' tower. The avatar uses both his arms to push the lever here.
Animation: "Teledahn_ClutchLeverForward"
Animation: "Teledahn_ClutchLeverBackward"


Wall wheel
Only used in Ahnonay inside the sphere1 tower, could be useful for mechanical puzzles.
Animation: "AhnySphere01_ValveWheelCW" (clockwise)
Animation: "AhnySphere01_ValveWheelCCW" (counterclockwise)


Garrison Elevators
That's a pretty specific animation, but a big advantage of it is that with this system the elevator is fully automatic, no need for buttons inside or a complex GUI. Also you don't really see the inside of the elevator, Which could be useful if you can't spend too much time creating it. Finally small elevators are problematic for the third person camera; which isn't suited for such small spaces.
Animation: "Garrison_ElevatorArrivingBottom"
Animation: "Garrison_ElevatorArrivingTop"
Animation: "Garrison_ElevatorLeavingBottom"
Animation: "Garrison_ElevatorLeavingTop"


"Pump button"
The big yellow Teledahn power tower button that you have to push three times to start the solar panel.
Animation: "Teledahn_PowerTowerPrimerButton"


"Fall from the bucket"
That's in Teledahn when you get out of the bucket in the upper shroom. I'm not sure how it could be used, but it's a pretty unique animation, so it might as well be listed here. (a slightly similar animation is the Cleft_CleftDropIn)
Animation: "Teledahn_GetOutOfBucket"


UseKi
This is the 'put you hand in the machine' animation used for the Nexus stations and in the Great Zero. Because in MO:RE we'll be allowed to use D'ni material this animations may be useful for.
Animation: "GlobalAnimations_InsertKiHand"


Again there are many other animations in Uru, so feel free to add some here. A full list without descriptions can be found in the discussion for this article.


Blender File

This blender scene contains a visual reference of all the animations listed above. All the objects inside are made to scale and can be used as a reference in your own Ages.

Avataranimsblend.jpg

Download (90kb) - Version 0.1 -- July 17 2008

This file doesn't include yet the Alcscript for all the objects, if someone feels brave enough to add it, please do.


Alcscripts

In Alcscript the avatar animation must be referenced without any prefix. For example GlobalAnimations_District_FemaleDoorButtonTouch becomes DoorButtonTouch in your Alcscript, so that it can be applied to all genders (yes, Uru has more than two of them ;) ).

Seek Points

Avatar animations require a "seek point", this is the point where the avatar moves to before playing the actual animation. Those are not a fixed position, but you might want them to be in front of the object and at least two feet away from it. To create a seek point object simply add an "Empty".


Here is an example Alcscript for an avatar animation triggered by a clickable activator.

<clickable object>:
    logic:
        modifiers:
          - name: <modifier name>
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: <click region>
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :<responder name>
        actions:
          - type: responder
            name: <responder name>
            responder:
                states:
                  - cmds:
                      - type: oneshotmsg
                        params:
                            receivers:
                              - oneshotmod:<seek point name>
                        waiton: -1
                    nextstate: 0
                    waittocmd: 0
                curstate: 0
                flags:
                  - detecttrigger

<seek point object>:
    logic:
        actions:
          - type: oneshot
            name: <seek point name>
            oneshot:
                animation: <avatar animation name>

Advanced oneshot parameters

  • seektime: Default = 2.0. The number of seconds the avatar will attempt to walk towards the seek point. When the seektime times out the avatar warps to the seek point.
  • drivable: Default = False. Unknown.
  • reversable: Default = False. Another spelling error here. ;) Presumably to play an avatar animation backwards. Not tested.
  • smartseek: Default = True. By default the avatar will try to walk towards the seek point. When set to False the avatar slides smoothly towards the seek point, ignoring colliders. When disabling smartseek it is recommended to set up your clickable with a small region and use the facing condition.
  • noseek: Default = False. If you set this to True the avatar will not even attempt to move towards the seek point. It will do the animation where it stands. However, setting smartseek to True overrides this!


For the default oneshot behavior you can leave these out of your Alcscript.


Here is an example which disables smartseek. This can be useful for subworlds where smartseek may sometimes fail.

<seek point object>:
    logic:
        actions:
          - type: oneshot
            name: <seek point name>
            oneshot:
                animation: <avatar animation name>
                seektime: 2.0
                drivable: false
                reversable: false
                smartseek: false
                noseek: false

Callbacks: Waiting on the avatar

An avatar animation is not the main action for a clickable. Usually we are opening a door, playing a sound, activating a Python script etc. However, the main action should always wait until the avatar animation has finished. In order to make it so we can add a callback message.

A callback message needs two references: a marker and a receiver. The marker is a name defined within the avatar animation (a list of valid marker names for each global avatar animation will be provided soon). The receiver is the responder which started it (hence callback). When the animation finishes the responder receives the callback message and continues with the next command.

In order for a command to wait its waiton value must be set. By default the waiton value is -1 which means "do not wait". A value of 0 (or any other number > 0) means "wait". The waiton value must match the waittocmd key.

A command with the waiton value set will not be executed until the message it specifies has been received. This will block the execution of the following commands as well. The specified message is the waittocmd msg value which must match the user id of the callback message that should be received by the responder.

Confused? You won't be after the next example. The Alcscript here is basically the same as shown previously but this time with a callback added to play a sound after the avatar animation has finished.

<clickable object>:
    logic:
        modifiers:
          - name: <modifier name>
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: <click region>
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :<responder name>
        actions:
          - type: responder
            name: <responder name>
            responder:
                states:
                  - cmds:
                      - type: oneshotmsg
                        params:
                            receivers:
                              - oneshotmod:<seek point name>
                            callbacks:
                              - marker: <avatar animation marker name>
                                receiver: respondermod:<responder name>
                                user: 0
                        waiton: -1
                      - type: soundmsg
                        params:
                            receivers:
                              - 0011:<sound emitter name>
                            cmds:
                              - play
                              - setvolume
                            volume: 1
                        waiton: 0
                    nextstate: 0
                    waittocmd:
                      - key: 0 #this is the waiton value
                        msg: 0 #this is the user value
                curstate: 0
                flags:
                  - detecttrigger