Avatar animation in a subworld

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!

Avatar animation in a subworld

Postby Frits » Wed Oct 08, 2008 5:37 am

When the avatar push a button in the subworld the callback does not work. The subworld start moving immediately while the avatar has not pushed the button yet.
Is it not possible to have a kind of wait command in AlcScript, lets say "wait: 3" (wait here for 3 seconds) or something like that?

Regards,
Frits
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Avatar animation in a subworld

Postby boblishman » Wed Oct 08, 2008 6:09 am

when it comes to Age creation ... "DOH" seems to be my middle name...
User avatar
boblishman
 
Posts: 882
Joined: Fri Oct 05, 2007 4:47 pm
Location: Spain

Re: Avatar animation in a subworld

Postby Frits » Wed Oct 08, 2008 6:34 am

Thanks, I have seen that topic, but that is not the solution to the problem.
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Avatar animation in a subworld

Postby GPNMilano » Wed Oct 08, 2008 7:31 am

Frits, are you using quickscripts or a full script for the animation? If you're using quickscripts and the buttontouch animation your animation won't work properly. You need to set a callback to wait for the avatar to finish the animation. which requires a full alcscript and the proper callback name to work.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Avatar animation in a subworld

Postby Frits » Wed Oct 08, 2008 7:46 am

Thanks, I have a full AlcScript for the animation.
I have solved the problem for the first part; I did not set a waiton to 0. So now the start is ok, but when I want to return, the animation of the avatar works, only the platform won't move anymore.

I use the following script for the button and platform;
Code: Select all
LiftButton:
   physical:
      subworld: Lift
   logic:
        modifiers:
        - cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: LiftButtonRegion
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: MoveLift

Lift:
   type: subworld
   animations:
     - name: AnimLift
      autostart: 0
      loop: 0
   
LiftFloor:
   physical:
      subworld: Lift
   logic:
      actions:
        - type: responder
         name: MoveLift
         responder:
            states:
              - cmds:
                 - type: oneshotmsg
                  params:
                     receivers:
                       - oneshotmod:PushTheButton
                     callbacks:
                       - marker: TouchButton
                        receiver: respondermod:MoveLift
                        user: 0
                  waiton: -1
                 - type: animcmdmsg
                  params:
                     receivers:
                       - 006D:Lift
                     animname: AnimLift
                     cmds:
                       - setforewards 
                            - continue
                  waiton: 0
                 - type: soundmsg
                  params:
                     receivers:
                       - 0011:LiftButtonSndEm
                     cmds:
                       - play
                       - setvolume
                     volume: 1
                  waiton: -1
               nextstate: 1
               waittocmd:
                 - key: 0
                  msg: 0
              - cmds:
                 - type: oneshotmsg
                  params:
                     receivers:
                       - oneshotmod:PushTheButton
                     callbacks:
                       - marker: TouchButton
                        receiver: respondermod:MoveFloor
                        user: 0
                  waiton: -1
                 - type: animcmdmsg
                  params:
                     receivers:
                       - 006D:Lift
                     animname: AnimLift
                     cmds:
                       - setbackwards 
                            - continue
                  waiton: 0
                 - type: soundmsg
                  params:
                     receivers:
                       - 0011:LiftButtonSndEm
                     cmds:
                       - play
                       - setvolume
                     volume: 1
                  waiton: -1
               nextstate: 0
               waittocmd:
                 - key: 0
                  msg: 0
            curstate: 0
            flags:
              - detecttrigger



I think there is a mistake somewere, but I can't find it.

Regards,
Frits
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Avatar animation in a subworld

Postby D'Lanor » Wed Oct 08, 2008 7:57 am

receiver: respondermod:MoveFloor

I think that should be MoveLift.
"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: Avatar animation in a subworld

Postby Frits » Wed Oct 08, 2008 8:12 am

Thanks D'Lanor, that was the mistake I overlooked like a thousend times, but now it works like a charm.
Now I have to figure out why I don't hear the sound of the button.

Regards,
Frits
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Avatar animation in a subworld

Postby Frits » Thu Oct 09, 2008 5:26 am

After spending a couple of hours trying to get the click sound for the button audible, I still don't hear anything.
I made an empty (LiftButtonSndEm) near the button, parented it to the lift empty and made an AlcScript for it;
Code: Select all
LiftButtonSndEm:
   type: soundemit
   sound:
      flags:
        - is3dsound
      file: click
      volume: 0.55
      mindist: 250
      maxdist: 250
      type: SoundFX
   physical:
      subworld: Lift

(and see the script in an earlier post)

Any ideas why I don't hear the sound?

Regards,
Frits
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am

Re: Avatar animation in a subworld

Postby Nadnerb » Thu Oct 09, 2008 10:20 am

Spelling/Copy error.

"mindist" and "maxdist" should be "minfdist" and "maxfdist"
Image
Live KI: 34914 MOULa KI: 23247 Gehn KI: 11588 Available Ages: TunnelDemo3, BoxAge, Odema
Nadnerb
 
Posts: 1057
Joined: Fri Sep 28, 2007 8:01 pm
Location: US (Eastern Time)

Re: Avatar animation in a subworld

Postby Frits » Fri Oct 10, 2008 2:52 am

Thanks Nadnerb, that was indeed a copy error. But in the same testing area there is a lever with the same error and you can head that sound well. Now I changed both scripts (with f), for the lever it makes no difference, but still no sound for my moving button.

Another idea what could be wrong?

Regards,
Frits

EDIT: Found the problem, I forgot to change the .wav into a .ogg file :oops: :oops:
Frits
 
Posts: 132
Joined: Sun Feb 10, 2008 7:00 am


Return to Building

Who is online

Users browsing this forum: No registered users and 5 guests