Turtle Isle (age problems)

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!

Re: Turtle Isle (age problems)

Postby dendwaler » Thu Jan 27, 2011 2:42 am

Thx D' Lanor!

It works ! ........like magic. :D

I am afraid that I will be back soon, with a new question.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Turtle Isle (age problems)

Postby dendwaler » Thu Jan 27, 2011 8:04 am

I added a soundemitter called : Door1_se
How can I invoke a trigger for sound into the last script for opening the door,
in such way that it is in sync with the animation of the door?
My soundfile has the same timelength as the animation.

Thx in advance!
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Turtle Isle (age problems)

Postby Jojon » Thu Jan 27, 2011 11:00 am

Add a sound message to the same responder action lists that already contain your animation messages.

Code: Select all
                      - type: soundmsg
                        params:
                            receivers:
                              - 0011:Door1_se
                            cmds:
                              - play
                        waiton: 0
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Turtle Isle (age problems)

Postby dendwaler » Thu Jan 27, 2011 1:32 pm

Thx Jojon,

the sound is working!

1 problem remains with the door.
when i press the button the first time the door opens with sound.
when the sequence has ended and i press the second time the door does not open , the soundfile does play.
The third press, opens the door again with sound played.
and so on, every uneven presses are correct, even presses not.
Does it have to do something with "nextstate and cuurent state"?
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Turtle Isle (age problems)

Postby D'Lanor » Thu Jan 27, 2011 1:44 pm

Probably because of the waiton value 0. Try this.

Code: Select all
Door1:
    animations:
      - name: DoorOpen1
        autostart: 0
        loop: 0
    logic:
        actions:
          - type: responder
            name: DoorOpen
            responder:
                states:
                  - cmds:
                      - type: oneshotmsg
                        params:
                            receivers:
                              - oneshotmod:DoorButtonOneshot
                            callbacks:
                              - marker: DoorButtonTouch
                                receiver: respondermod:DoorOpen                   
                                user: 0
                        waiton: -1
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:Door1
                            animname: DoorOpen1   
                            cmds:
                              - continue
                        waiton: 0
                      - type: soundmsg
                        params:
                            receivers:
                              - 0011:Door1_se
                            cmds:
                              - play
                        waiton: -1
                    nextstate: 0
                    ncallbacks: 1
                    waittocmd:
                      - key: 0
                        msg: 0
                curstate: 0
                flags:
                  - detecttrigger
          - type: responder
            name: DoorOpen.001
            responder:
                states:
                  - cmds:
                      - type: oneshotmsg
                        params:
                            receivers:
                              - oneshotmod:DoorButtonOneshot.001
                            callbacks:
                              - marker: DoorButtonTouch
                                receiver: respondermod:DoorOpen.001
                                user: 0
                        waiton: -1
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:Door1
                            animname: DoorOpen1   
                            cmds:
                              - continue
                        waiton: 0
                      - type: soundmsg
                        params:
                            receivers:
                              - 0011:Door1_se
                            cmds:
                              - play
                        waiton: -1
                    nextstate: 0
                    ncallbacks: 1
                    waittocmd:
                      - key: 0
                        msg: 0
                curstate: 0
                flags:
                  - detecttrigger
"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: Turtle Isle (age problems)

Postby Jojon » Thu Jan 27, 2011 2:01 pm

Sounds more like dendwalder has added a new state for the sound.

The sound message should be part of the same commands list (" - cmds:") as the animation, the way D'Lanor shows -- not given a state entry of its own (you'd use more states if you want the type of behaviour described, e.g. if you want the button to toggle open and closed state for the door; press once to open and another time to close).

waiton: 0 should be correct, otherwise the sound will start too early.
Jojon
 
Posts: 1116
Joined: Sun Sep 30, 2007 5:49 am

Re: Turtle Isle (age problems)

Postby dendwaler » Thu Jan 27, 2011 2:09 pm

I replaced the script with yours D'lanor.
Unfortunately this makes no difference, except for the sound which starts exact now.

I want it to close automaticly, not a toggle for open and close.
In the end, i want that you can only open the door if you have touched all the journey clothes in my age.

In that way , with more players in the age the door can only be opened by those who have forfilled the journey task even with several people in the age.
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Turtle Isle (age problems)

Postby D'Lanor » Thu Jan 27, 2011 2:21 pm

Both Jojon's and mine should work if added to the same responder. The sound will NOT start too early in my example though. The FIRST message with waiton 0 holds any subsequent message.

I have no idea what went wrong. If it worked without sound it should work with it.
"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: Turtle Isle (age problems)

Postby dendwaler » Thu Jan 27, 2011 2:26 pm

If it worked without sound it should work with it.


Oh sorry, i was not clear in that.
Without the sound it did not work either.
I posted it worked in my enthousiasme, but did not immediately notice that it only responded on uneven presses :oops:
Those wonderfull Worlds are called " Ages" , because that is what it takes to build one.



Watch my latest Video Or even better..... watch the Cathedral's Complete Walkthrough made by Suleika!
User avatar
dendwaler
 
Posts: 936
Joined: Mon Jun 22, 2009 10:49 am
Location: Nederland

Re: Turtle Isle (age problems)

Postby D'Lanor » Thu Jan 27, 2011 2:28 pm

On second thought, are you sure your animation and sound are of the same length? Or does the animation have a static section at the end which is still "playing" even though it seems finished?

Edit: Oops, cross posted. Forget this then.
Last edited by D'Lanor on Thu Jan 27, 2011 2:30 pm, edited 1 time in total.
"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

PreviousNext

Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests