Subworlds and avatar animation

If you feel like you're up to the challenge of building your own Ages in Blender or 3ds Max, this is the place for you!

Subworlds and avatar animation

Postby D'Lanor » Wed Sep 03, 2008 6:56 pm

I have a clickable in my subworld that should trigger an avatar animation. It worked fine when it was outside the subworld but now the avatar walks to the animation target but never does the animation. Does anyone know why this is (not) happening??

Here is the latest version of my alcscript, but all versions I tried are giving the same result: Everything works for my subworld clickable except the avatar animation.

Code: Select all
RingSphere:
    logic:
        modifiers:
          - tag: RingClick
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: RgnCloud
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
              - type: facing
                satisfied: true
                directional: true
                tolerance: 0.9
            actions:
              - type: pythonfile
                ref: $RingClick
              - type: responder
                ref: $RingResp
        actions:
          - type: pythonfile
            tag: RingClick
            pythonfile:
                file: PradGameState
                parameters:
                  - type: activator
                    ref: logicmod:$RingClick
                  - type: string
                    value: RingSphere
          - type: responder
            tag: RingResp
            responder:
              states:
                - cmds:
                    - type: oneshotmsg
                      params:
                          receivers:
                            - oneshotmod:LinkInPointCloud
                          callbacks:
                            - marker: ButtonTouch
                              receiver: respondermod:$RingResp
                              user: 0
                      waiton: -1
                    - type: soundmsg
                      params:
                          receivers:
                            - 0011:RingClickEmit
                          cmds:
                            - play
                            - setvolume
                          volume: 0.7
                      waiton: 0
                  nextstate: 1
                  waittocmd:
                    - key: 0
                      msg: 0
              curstate: 0
              flags:
                - detecttrigger

LinkInPointCloud:
    logic:
        actions:
          - type: oneshot
            name: LinkInPointCloud
            oneshot:
                animation: ButtonTouch

In this version the sound also breaks obviously because it waits for a callback from the oneshot that never comes. If I put the sound in its own responder it plays fine.

At first I thought that the problem was the empty which cannot receive a subworld physical reference so I tried a mesh as animation target. The result was identical: Avatar moves to target and stops dead.

Code: Select all
TargetMesh:
    physical:
        subworld: Subworld
    logic:
        actions:
          - type: oneshot
            name: TargetMesh
            oneshot:
                animation: ButtonTouch


This is driving me nuts... :(
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Subworlds and avatar animation

Postby Grogyan » Thu Sep 04, 2008 12:24 am

I have a couple of ideas,
1) Have yo tried moving all the objects and regions within the subworld to another scene (not to forget the "page_num" logic property), thus a seperate prp file - this is generally what Cyan does it may work here too?

2) Have you tried confine everything in the subworld to an Empty? Reason being that with everything moving, the regions inside the subworld would also move


Yes I know that they stay stationry with the world moving when iside the subworld.
Just thinking of ideas

I know that for my "roller coaster" i'll be moving stuff into a sperate scene
Better to have loved and lost than never to have loved at all
User avatar
Grogyan
 
Posts: 1203
Joined: Thu Oct 11, 2007 1:27 am

Re: Subworlds and avatar animation

Postby D'Lanor » Thu Sep 04, 2008 4:18 am

Grogyan wrote:I have a couple of ideas,
1) Have yo tried moving all the objects and regions within the subworld to another scene (not to forget the "page_num" logic property), thus a seperate prp file - this is generally what Cyan does it may work here too?

Good point. There has to be a reason for that and this just might be it. I will try this.

Edit: Alas, that did not work.

Grogyan wrote:2) Have you tried confine everything in the subworld to an Empty? Reason being that with everything moving, the regions inside the subworld would also move

Yes, my subworld is an animated empty with the objects parented to it. btw, this method would not work for large subworlds because if you parent more than a few objects the lag becomes horrible. Empties and regions don't cause lag though.
Furthermore both the clickable and its region must be defined as colliders in the subworld (obvious enough but it took a while to figure that out).

At one point I even tried to use the subworld empty as animation target, but no luck.

Edit: I just noticed that sometimes the avatar animation runs once and then breaks on subsequent clicks. I still think it has something to do with the animation setup since my subworld is in constant motion.

Edit 2: I managed to pin down the problem to the seeking of the animation target. It seems a moving target confuses Uru whether it moves with the subworld or not. I have it working now when the avatar is standing exactly at the seek point. I am going to fiddle with the oneshot flags a bit.
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Subworlds and avatar animation

Postby D'Lanor » Thu Sep 04, 2008 12:30 pm

Problem solved! I had to disable smartseek.

Besides "remote" and "animation" the oneshotmod has a few lesser known parameters.

seektime: You probably know this one already. The number of seconds the avatar keeps trying to get to the remote. This does not seem to work very accurately though.

drivable: Unknown according to the wiki. But contrary to what the wiki says the default is False.

reversable: Another spelling error here. ;) Hmm, playing an avatar animation backwards? Sounds interesting, must try this some time. The wiki is wrong again about the default for this one. It is False by default.

smartseek: Here it gets interesting. Smartseek is True by default and this was causing my problems. When set to False the avatar will slide smoothly towards the remote instead of trying to walk. If you keep the region small and use the facing condition it won't look so bad.

noseek: Default is False. If you set this to True the avatar will not even attempt to move towards the remote. It will do the animation where it stands. However, setting smartseek to True overrides this!
"It is in self-limitation that a master first shows himself." - Goethe
User avatar
D'Lanor
 
Posts: 1980
Joined: Sat Sep 29, 2007 4:24 am

Re: Subworlds and avatar animation

Postby Trylon » Thu Sep 04, 2008 2:37 pm

If the wiki is incorrect, feel free to correct it ;)
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


Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests