Howto: Region triggered Python

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!

Howto: Region triggered Python

Postby ddb174 » Fri Sep 26, 2008 6:38 pm

I'm looking for a way to have some Python code triggered by the avatar entering a region:

Code: Select all
#tag is a local name used within this alcScript object.
LinkRegion:
    logic:
        actions:
          - type: pythonfile
            tag: linkaction
            pythonfile:
                file: dusttest
                parameters:
                  - type: string
                    value: EderDelin
        modifiers:
          - tag: linkmod1
            actions:
              - type: pythonfile
                ref: $linkaction
            activators:
              - type: objectinvolume
                remote: LinkRegion
                triggers:
                  - any



My python file dusttest.py, loads correctly, but never has a function called (I made sure to have the same event functions) when I go through the region.

Does anyone notice anything wrong?
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm

Re: Howto: Region triggered Python

Postby D'Lanor » Fri Sep 26, 2008 6:54 pm

I posted something like that a long time ago. Let's see...

Here you go: viewtopic.php?f=18&t=1550
"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: Howto: Region triggered Python

Postby ddb174 » Fri Sep 26, 2008 8:34 pm

Excellent; that does the job perfectly!
ddb174
 
Posts: 928
Joined: Thu Apr 10, 2008 7:28 pm


Return to Building

Who is online

Users browsing this forum: No registered users and 4 guests

cron