Clickable sound not in sync

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!

Clickable sound not in sync

Postby wodan944 » Mon Dec 28, 2009 1:37 pm

Hi, I have this problem, when i click with my mouse on a button, you hear the sound i've made for it, but then the avatar pushes the button.
Is there a script for making the sound and the pushing of the Avatar in sync?
Hope someone can help me.

Greetz Wodan944
Creativity involves breaking out of established patterns in order to look at things in a different way.

Edward De Bono
User avatar
wodan944
 
Posts: 52
Joined: Wed Jan 07, 2009 12:37 pm

Re: Clickable sound not in sync

Postby D'Lanor » Mon Dec 28, 2009 4:47 pm

Yes, there is. Take a look at the wiki section here about adding a callback to your oneshot message.
"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: Clickable sound not in sync

Postby wodan944 » Tue Dec 29, 2009 4:31 am

Thank you for your reply, D'Lanor,
I assume the script on the Wiki is for buttons, but were do i put the callback etc in my Button script.
The script below is part of a puzzle in my new Age and so it's a little different as shown at the Wiki

Code: Select all
SWDoor_1Button:
    animations:
        - name: SWdoor_1buttonclick
          autostart: 0
          loop: 0
   logic:
        modifiers:
          - tag: AutoClick
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: Door_1ButtonRgn
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: pythonfile
                ref: $BoolToggle
        actions:
          - type: pythonfile
            tag: BoolToggle
            pythonfile:
                file: xAgeSDLBoolToggle
                parameters:
                  - type: activator
                    ref: logicmod:$AutoClick
                  - type: string
                    value: Ashream_3ingang
                  - type: skip
                  - type: skip
                  - type: string
                    value: Ashream_3ingang
          - type: pythonfile
            tag: BoolRespond
            pythonfile:
                file: ashAgeSDLBoolRespondReset
                parameters:
                  - type: string
                    value: Ashream_3ingang
                  - type: responder
                    ref: :Door_1Open
                  - type: responder
                    ref: :Door_1Close
                  - type: bool
                    value: false
                  - type: bool
                    value: true



Wodan944
Creativity involves breaking out of established patterns in order to look at things in a different way.

Edward De Bono
User avatar
wodan944
 
Posts: 52
Joined: Wed Jan 07, 2009 12:37 pm

Re: Clickable sound not in sync

Postby D'Lanor » Tue Dec 29, 2009 6:35 am

It would be part of your responder scripts. Door_1Open and Door_1Close.
"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: Clickable sound not in sync

Postby wodan944 » Tue Dec 29, 2009 1:30 pm

Thank you, D'Lanor
Its now working fine.

Wodan944
Creativity involves breaking out of established patterns in order to look at things in a different way.

Edward De Bono
User avatar
wodan944
 
Posts: 52
Joined: Wed Jan 07, 2009 12:37 pm


Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests

cron