Portal41To44:
physical:
physlogic: detect
logic:
modifiers:
- tag: mod
flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: pythonfile
ref: $click
actions:
- type: pythonfile
tag: click
pythonfile:
file: PahtsPortal
parameters:
- type: activator
ref: $mod
- type: string
value: Portal41To44
def __init__(self):
ptResponder.__init__(self)
self.id =
self.version = 1
Door:
logic:
modifiers:
- name: Enter_Door_Rgn
cursor: nochange
flags:
- multitrigger
activators:
- type: objectinvolume
remote: <door region>
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: pythonfile
ref: :Pyth_Door
- name: Exit_Door_Rgn
cursor: nochange
flags:
- multitrigger
activators:
- type: objectinvolume
remote: <door region>
triggers:
- exit
conditions:
- type: volumesensor
satisfied: true
direction: exit
actions:
- type: pythonfile
ref: :Pyth_Door
actions:
- type: pythonfile
name: Pyth_Door
pythonfile:
file: <python file>
parameters:
- type: activatorlist
refs: ['logicmod:Enter_Door_Rgn', 'logicmod:Exit_Door_Rgn']
from Plasma import *
from PlasmaTypes import *
actDoorRegion = ptAttribActivator(1, 'Door region activator')
class <python file>(ptModifier,):
def __init__(self):
ptModifier.__init__(self)
self.named = self.__class__.__name__
def OnNotify(self, state, id, events):
if (not state):
return
if (id == actDoorRegion.id):
for event in events:
if (event[0] == kCollisionEvent):
if event[1]:
PtDebugPrint('%s: OnNotify: id = %d: Someone entered the region' % (self.named, id))
else:
PtDebugPrint('%s: OnNotify: id = %d: Someone left the region' % (self.named, id))
break
Users browsing this forum: No registered users and 0 guests