Where am I missing?

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: Where am I missing?

Postby ametist » Sat Jan 02, 2010 1:06 am

And here I am with some more gray hairs :| - first off I took one of my other pythonfiles, changed the name and id and saved it with name of the age, checked it against another python I know work and it was exact the same. No luck - elf gave me the same message - no pythonfile found.

second: I did something foolish I think :( , I renamed the age - just gave it a capital letter to start with instead of the lower case one I previously used, and gave it a new ageprefixnumber, deleted all .sav files, all age-files and python, renamed the sdl-file with the capital letter and wrote a statedesc version 2 into it.

... same ' answer' from elf - 'no pythonfile found, no globalSDLfile found for... but it still write the age-name with the lowercase letter in the beginning of the name for the sdl-file- so here is where I think I made the mistake, I recall Fero said somewhere not to change both names and ageprefix at the same time :?

yesterday no work with it all....

So what's best to do now? Rename the age again with a brand new name?
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Re: Where am I missing?

Postby D'Lanor » Sat Jan 02, 2010 6:06 am

You did it correctly. You changed both the age name and the prefix number which makes it a new age. That means your SDL file should start fresh from version 1 as well, using the new name. Be sure to change the name within the SDL file too (Edit: and don't forget the class name within your Python file if you copied it).

Changing the capital should have been enough, but you never know. After all it runs on Windows which is a non case-sensitive operating system.

Yes, try a whole different name instead.
"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: Where am I missing?

Postby ametist » Sat Jan 02, 2010 8:02 am

Phew :) Always nice to hear you did something right :lol: . Ok, then I'll try with a brand new name and rewrite the alscript from scratch. I have found that sometimes when I have messed around with the alscript, deleting and adding in several cycles, it can help if everything is deleted, then save, then open up blender again and write a whole new alscript. Don't know if that is based on science or faith but it most often works out 8-)
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Re: Where am I missing?

Postby D'Lanor » Sat Jan 02, 2010 9:03 am

I also found an error in your AlcScript. If you are calling xAgeSDLBoolRespond you cannot just skip parameters. So this is wrong:

Code: Select all
          - type: pythonfile
            tag: BoolRespond
            pythonfile:
                file: xAgeSDLBoolRespond
                parameters:
                  - type: string
                    value: Moving
                  - type: responder
                    ref: $AnimMoving
                  - type: bool
                    value: false
                  - type: bool
                    value: true

You could add an empty parameter to replace the missing second like this:

Code: Select all
          - type: pythonfile
            tag: BoolRespond
            pythonfile:
                file: xAgeSDLBoolRespond
                parameters:
                  - type: string
                    value: Moving
                  - type: responder
                    ref: $AnimMoving
                  - type: skip
                  - type: bool
                    value: false
                  - type: bool
                    value: true


But... why is there no second responder? An SDL variable needs a responder for both (all) of its states! So you need to add that second responder.

If however this is a looping animation that needs to be started or stopped in response to the sdl state then you are using the wrong global Python file. A better file to use in that case is xAgeSDLIntStartStopResp. That would make the AlcScript for the swing look like this:

Code: Select all
swing:
    physical:
        subworld: SubworldTR
    logic:
        modifiers:
          - tag: AutoClick
            cursor: poised
            flags:
              - localelement
            activators:
              - type: objectinvolume
                remote: RgnExit
                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: Moving
                  - type: skip
                  - type: skip
                  - type: string
                    value: Moving
          - type: pythonfile
            tag: IntStartStopResp
            pythonfile:
                file: xAgeSDLIntStartStopResp
                parameters:
                  - type: string
                    value: Moving
                  - type: responder
                    ref: $AnimMoving
                  - type: string
                    value: 1
                  - type: bool
                    value: false
                  - type: responder
                    ref: $AnimNoMoving
                  - type: bool
                    value: false
          - type: responder
            tag: AnimMoving
            responder:
                states:
                  - cmds:
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:SubworldTR
                            animname: Moving
                            cmds:
                              - continue
                        waiton: -1
                    nextstate: 0
                    waittocmd: 0
                curstate: 0
                flags:
                  - detecttrigger
          - type: responder
            tag: AnimNoMoving
            responder:
                states:
                  - cmds:
                      - type: animcmdmsg
                        params:
                            receivers:
                              - 006D:SubworldTR
                            animname: Moving
                            cmds:
                              - stop
                        waiton: -1
                    nextstate: 0
                    waittocmd: 0
                curstate: 0
                flags:
                  - detecttrigger

Edit: And of course you need to make the subworld animation looping then:

Code: Select all
SubworldTR:
    type: subworld
    animations:
        - name: Moving
          autostart: 0
          loop: 1
"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: Where am I missing?

Postby ametist » Sun Jan 03, 2010 8:01 am

Thanks D'lanor for helping! Much appreciated because I actually don't quite know what I am doing when writing alscript with SDL yet, that's the answer to why there are no second responder ;). I'm starting all over and take one anim at a time, just now I got one of them working as a triggered anim. I'm slowly moving towards the SDL states ;)

And no, the anims are not looping, just one cycle that must be triggered again if one wants a new 'ride', and they can't be stopped while running. The critters are trained, but for time being they can only perform one simple trick each 8-)
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Re: Where am I missing?

Postby D'Lanor » Sun Jan 03, 2010 8:23 am

Then you don't need SDL states at all...
"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: Where am I missing?

Postby ametist » Mon Jan 04, 2010 9:05 am

Yes, I hope to get to the point where I'll need SDL states later on :D . As soon everything is running smoothly with triggered anims, then it'll be time to do some more complex 'tricks'. That alscript you posted for looping anims looks very interesting! :)
User avatar
ametist
 
Posts: 360
Joined: Fri Dec 28, 2007 6:55 am

Previous

Return to Building

Who is online

Users browsing this forum: No registered users and 3 guests