Subworlds: animation states saving problem

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: animation states saving problem

Postby Corvus » Tue Feb 03, 2009 7:04 am

I have to rides in my age (balloon and elevator) and made a sdl, a py.file and modified my alcscript. The animation doesn't "glitch" now any more, but when I link in, the elevator is always in the "up position" and the balloon at the opposite side of where I want it to be when you visit the first time, no matter where I left them. I changed my sdl file, but still the same. Could someone please help me with this?

This is my sdl file:
Code: Select all
STATEDESC Hayal
{
    VERSION 1
   
    VAR BOOL    Ride[1]   DEFAULT=0 DEFAULTOPTION=VAULT
    VAR BOOL    RideUp[1]   DEFAULT=0 DEFAULTOPTION=VAULT

}

STATEDESC Hayal
{
    Version 2
   
    VAR BOOL    Ride[1]   DEFAULT=1 DEFAULTOPTION=VAULT
    VAR BOOL    RideUp[1]   DEFAULT=1 DEFAULTOPTION=VAULT
}


This is my alcscript for the balloon (the one for the elevator is analogue):
Code: Select all
RgnEnterKorb:
   type: region
   regiontype: subworld
   region:
      subworld: SubworldKorb

         
RgnExitKorb:
   type: region
   regiontype: subworld
   region:
      onexit: 1
   physical:
      subworld: SubworldKorb
         
Korb:
   physical:
      subworld: SubworldKorb
    logic:
        modifiers:
          - tag: AutoClick
           cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: RgnExitKorb
                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: Ride
                  - type: skip
                  - type: skip
                  - type: string
                    value: Ride
          - type: pythonfile
            tag: BoolRespond
            pythonfile:
                file: xAgeSDLBoolRespond
                parameters:
                  - type: string
                    value: Ride
                  - type: responder
                    ref: $AnimRide
                  - type: responder
                    ref: $AnimRide
                  - type: bool
                    value: false
                  - type: bool
                    value: true
         - type: responder
          tag: AnimRide
          responder:
               states:
                - cmds:
                   - type: animcmdmsg
                     params:
                        receivers:
                         - 006D:SubworldKorb
                        animname: Ride
                        cmds:
                   - setforewards
                         - continue
                waiton: -1
              nextstate: 1
              waittocmd: 0
                - cmds:
                   - type: animcmdmsg
                     params:
                        receivers:
                         - 006D:SubworldKorb
                        animname: Ride
                        cmds:
                   - setbackwards
                         - continue
                waiton: -1
              nextstate: 0
              waittocmd: 0
               curstate: 0
               flags:
                  - detecttrigger       

SubworldKorb:
   type: subworld
   animations:
      - name: Ride
        autostart: 0
        loop: 0
"To regard the imagination as metaphysics is to think of it as part of life, and to think of it as part of life is to realize the extent of artifice. We live in the mind."

-Wallace Stevens-
User avatar
Corvus
 
Posts: 204
Joined: Fri Feb 15, 2008 11:21 am
Location: Germany

Re: Subworlds: animation states saving problem

Postby D'Lanor » Tue Feb 03, 2009 10:07 am

Possibly an indentation problem with the - setbackwards and - setforewards commands. They should go 6 positions to the right.
"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: animation states saving problem

Postby Corvus » Tue Feb 03, 2009 11:06 am

I checked, but in Blender it looks OK.
Image

Would it even work if the indentation were wrong?

I'm completely new to this kind of stuff. Is there anything else I should check?
"To regard the imagination as metaphysics is to think of it as part of life, and to think of it as part of life is to realize the extent of artifice. We live in the mind."

-Wallace Stevens-
User avatar
Corvus
 
Posts: 204
Joined: Fri Feb 15, 2008 11:21 am
Location: Germany

Re: Subworlds: animation states saving problem

Postby D'Lanor » Tue Feb 03, 2009 11:37 am

Yes, the Python.0.elf logfile. That should tell you if anything is happening. It can be viewed with the ELF Viewer

Edit: Oh wait. You only have one responder. Cyan's global Python files need two responders. Let me rewrite your script...

Edit 2: Here we are. This should work.

Code: Select all
RgnEnterKorb:
    type: region
    regiontype: subworld
    region:
        subworld: SubworldKorb

         
RgnExitKorb:
    type: region
    regiontype: subworld
    region:
        onexit: 1
    physical:
        subworld: SubworldKorb
         
Korb:
    physical:
        subworld: SubworldKorb
    logic:
        modifiers:
          - tag: AutoClick
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: RgnExitKorb
                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: Ride
                  - type: skip
                  - type: skip
                  - type: string
                    value: Ride
          - type: pythonfile
            tag: BoolRespond
            pythonfile:
                file: xAgeSDLBoolRespond
                parameters:
                  - type: string
                    value: Ride
                  - type: responder
                    ref: $AnimRideFW
                  - type: responder
                    ref: $AnimRideBW
                  - type: bool
                    value: false
                  - type: bool
                    value: true
          - type: responder
            tag: AnimRideFW
            responder:
                states:
                  - cmds:
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:SubworldKorb
                            animname: Ride
                            cmds:
                              - setforewards
                              - continue
                        waiton: -1
                    nextstate: 1
                    waittocmd: 0
                curstate: 0
                flags:
                  - detecttrigger
          - type: responder
            tag: AnimRideBW
            responder:
                states:
                  - cmds:
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:SubworldKorb
                            animname: Ride
                            cmds:
                              - setbackwards
                              - continue
                        waiton: -1
                    nextstate: 0
                    waittocmd: 0
                curstate: 0
                flags:
                  - detecttrigger       

SubworldKorb:
    type: subworld
    animations:
      - name: Ride
        autostart: 0
        loop: 0
"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: animation states saving problem

Postby Corvus » Tue Feb 03, 2009 3:23 pm

It works! Thank you so much for your help, D'Lanor! You brought my day to a very happy end.
"To regard the imagination as metaphysics is to think of it as part of life, and to think of it as part of life is to realize the extent of artifice. We live in the mind."

-Wallace Stevens-
User avatar
Corvus
 
Posts: 204
Joined: Fri Feb 15, 2008 11:21 am
Location: Germany


Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests

cron