I'm trying to create a functional plObjectInVolumeDetector (think the floor panels in Teledahn). So far I've got an ALCscript which I suspect is broken, and a python script which I suspect is perfectly fine.
Between the two code pieces, whenever the avatar (or, I think, any object) goes into the region, two lines should be placed into the python.0.elf file:
python.0.elf wrote:Event notification recieved...
It's from our goal region! yay!
Unforunately, I'm not getting either of those lines.
I know it's loading my python file - I forgot to put my testage2.pak file into my Uru folder the first time I tested it, and it failed to load tst2Goal.py - when I added the .pak file, that error went away.
ALCscript
- Code: Select all
Region_Goal:
logic:
modifiers:
- tag: Goal
flags:
- localelement
cursor: nochange
activators:
- type: objectinvolume
remote: Region_Goal
triggers:
- any
actions:
- type: pythonfile
ref: $PythResp
actions:
- type: pythonfile
tag: PythResp
pythonfile:
file: tst2Goal
parameters:
- type: activator
ref: logicmod:$Goal
Python Script
- Code: Select all
from Plasma import *
from PlasmaTypes import *
actGoal = ptAttribActivator(1, "Goal Activator")
class tst2Goal(ptResponder,):
__module__ = __name__
def __init__(self):
ptResponder.__init__(self)
self.id=1009100
self.version = 1
self.ballObject = None
def OnFirstUpdate(self):
pass
def OnServerInitComplete(self):
pass
def OnSDLNotify(self, VARname, SDLname, playerID, tag):
pass
def OnNotify(self, state, id, events):
PtDebugPrint("Event notification recieved...")
if(id == actGoal.id):
PtDebugPrint("It's from our goal region! yay!")