Changing SDL Variables

Help bring our custom Ages to life! Share tips and tricks, as well as code samples with other developers.

Changing SDL Variables

Postby GPNMilano » Mon Jun 16, 2008 1:10 am

Hey out there. I was wondering if someone out there in programming land could help me. I need a sample python script that works similiar to the yeesha pages (clicking the object turns a vis off and back on).

EDIT: To further explain. Rather than a single object, I want to take a group of objects in blender. Make them all into one SDL Variable. But have them remain on the same PRP as the rest of the objects in that page. Then have a python script that changes the SDL variable for that vis and toggles the multiple objects, on and off.
You can't stop the truth. IC Blog
User avatar
GPNMilano
 
Posts: 1155
Joined: Mon Apr 21, 2008 5:50 am

Re: Changing SDL Variables

Postby D'Lanor » Mon Jun 16, 2008 10:55 am

There is a sample script here: http://www.guildofwriters.com/wiki/Using_SDL_States.

It will be an interesting experiment to use one SDL variable for multiple objects. You'll have to write the alcscript manually though because the boolshowhide quickscript automatically uses the name of the object with the Vis postfix as SDL variable.

Code: Select all
<object name>:
    logic:
        actions:
          - type: pythonfile
            pythonfile:
                file: xAgeSDLBoolShowHide
                parameters:
                  - type: string
                    value: <sdl variable name>
                  - type: bool
                    value: true


I see no reason why it shouldn't work but I wonder why Cyan uses more elaborate methods to set visibility on multiple objects.
"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


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron