Page 6 of 13

Re: Turtle Isle (age problems)

Posted: Tue Jan 11, 2011 1:12 pm
by dendwaler
Image

a little change

Re: Turtle Isle (age problems)

Posted: Tue Jan 11, 2011 2:17 pm
by ZURI
Looks great dendwaler. The sunflowers are a nice touch!

Re: Turtle Isle (age problems)

Posted: Tue Jan 11, 2011 3:07 pm
by nathan2055
Very nice! I like it! I can't wait to see the finished Age!!!

Re: Turtle Isle (age problems)

Posted: Tue Jan 11, 2011 11:20 pm
by dendwaler
Thx Zuri and Nathan.

I am afraid it will never be really finished, but i will release it not to far away anyway.
Before Eastern is my goal.

Re: Turtle Isle (age problems)

Posted: Wed Jan 12, 2011 10:08 am
by ZURI
Just keep chugging along den. You have some great texturing skills. I have no doubt that you'll have a finished product eventually. That day may be years away, but I'm sure it will come. :D

Re: Turtle Isle (age problems)

Posted: Wed Jan 12, 2011 10:16 am
by D'Lanor
Do we get an Easter egg then? ;)

Re: Turtle Isle (age problems)

Posted: Wed Jan 12, 2011 12:44 pm
by nathan2055
dendwaler wrote:Thx Zuri and Nathan.

I am afraid it will never be really finished, but i will release it not to far away anyway.
Before Eastern is my goal.

Don't worry, a good Age is never finished! What do you mean by "Before Eastern"?
ZURI wrote:Just keep chugging along den. You have some great texturing skills. I have no doubt that you'll have a finished product eventually. That day may be years away, but I'm sure it will come. :D

I agree!

Re: Turtle Isle (age problems)

Posted: Wed Jan 26, 2011 12:36 pm
by dendwaler
I have really a hard time to understand Alcscripting to trigger animations.
I think it is the recursive structure of it, which i can't follow.
Unfortunately there is not one example with a line by line command of what it does.
Please help me with the next problem.

I have a door (gate) with an Ipo animation.
(the animation works when looping , but i want a triggered one shot )
The animation is a complete one, no need to remenber the state.)
the door opens, stays open for 10 seconds and closes again.
On both sides of the gate is a button.
Both buttons must be able to start the animation sequence.
I added a pict of the used Blender Objects

and use the following script.

Code: Select all

DoorButton:
   logic:
        modifiers:
          - cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: DoorButtonRgn
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :DoorOpen

   
DoorButton.001:
   logic:
        modifiers:
          - cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: DoorButtonRgn.001
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :DoorOpen

               
DoorButtonOneshot.001:
   logic:
      actions:
         - type: oneshot
           name: DoorButtonOneshot.001
           oneshot:
             animation: DoorButtonTouch
               
DoorButtonOneshot:
   logic:
      actions:
         - type: oneshot
           name: DoorButtonOneshot
           oneshot:
             animation: DoorButtonTouch

Door1:
    animations:
        - name: DoorOpen1
          autostart: 0
          loop: 0
    logic:
        actions:
          - type: responder
            name: DoorOpen
            responder:
               states:
                - cmds:
               - type: oneshotmsg
                params:
                  receivers:
                   - oneshotmod:DoorButtonOneshot.001
                   callbacks:
                     - marker: "DoorButtonTouch"
                     receiver: respondermod:DoorOpen                   
                   - type: animcmdmsg
                     params:
                        receivers:
                         - 006D:Door1
                        animname: DoorOpen1   
         



Image

Please for some advise to be able to continue.

Re: Turtle Isle (age problems)

Posted: Wed Jan 26, 2011 12:55 pm
by tachzusamm
nathan2055 wrote:What do you mean by "Before Eastern"?

Hehe. Funny how a single n can change the meaning of a word.
I'm sure he meant "Easter". (In Germany we would say "Vor Ostern", by the way. With an n at the end as well).

Re: Turtle Isle (age problems)

Posted: Wed Jan 26, 2011 5:12 pm
by D'Lanor
This should do the trick.

Code: Select all

DoorButton:
    logic:
        modifiers:
          - cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: DoorButtonRgn
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :DoorOpen

DoorButton.001:
    logic:
        modifiers:
          - cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: DoorButtonRgn.001
                triggers:
                  - any
            conditions:
              - type: activator
                activators:
                  - type: picking
              - type: objectinbox
                satisfied: true
            actions:
              - type: responder
                ref: :DoorOpen.001

DoorButtonOneshot.001:
   logic:
      actions:
         - type: oneshot
           name: DoorButtonOneshot.001
           oneshot:
               animation: DoorButtonTouch

DoorButtonOneshot:
   logic:
      actions:
         - type: oneshot
           name: DoorButtonOneshot
           oneshot:
               animation: DoorButtonTouch

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
                    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
                    nextstate: 0
                    ncallbacks: 1
                    waittocmd:
                      - key: 0
                        msg: 0
                curstate: 0
                flags:
                  - detecttrigger


I added a second responder because you need different oneshots for each button, even though the door animation is the same.