Thx a lot D'Lanor(and Sirius as well), i will try that.
I will post about the result as soon as i sucessfully implemented it.
Rgn_SpawnFromHere:
logic:
modifiers:
- flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: pythonfile
pythonfile:
file: SpawnToMe
parameters:
- type: objectinvolume
ref: logicmod:Rgn_SpawnFromHere
- type: sceneobject
ref: scnobj:SpawnToMe
Rgn_SpawnFromHere:
logic:
modifiers:
- flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions: pythonfile
ref: $gospawn
actions:
- type: pythonfile
tag: gospawn
pythonfile:
file: SpawnToMe
parameters:
- type: objectinvolume
ref: logicmod:Rgn_SpawnFromHere
- type: sceneobject
ref: scnobj:SpawnToMe
Rgn_SpawnFromHere:
logic:
modifiers:
flags:
- multitrigger
activators:
- type: objectinvolume
triggers:
- enter
conditions:
- type: volumesensor
satisfied: true
direction: enter
actions:
- type: pythonfile
ref: $gospawn
actions:
- type: pythonfile
tag: gospawn
pythonfile:
file: SpawnToMe
parameters:
- type: activator
ref: logicmod:Rgn_SpawnFromHere
- type: sceneobject
ref: scnobj:SpawnToMe
from Plasma import *
from PlasmaTypes import *
actRegion = ptAttribActivator(1, 'Region activator')
objSpawnPoint = ptAttribSceneobject(2, 'Spawn point object')
kFadeOutSeconds = 1.5
kTimerSeconds = 3.0
kFadeInSeconds = 1.5
class SpawnToMe(ptModifier):
def __init__(self):
ptModifier.__init__(self)
def OnNotify(self, state, id, events):
if ((id == actRegion.id) and state):
if (not PtWasLocallyNotified(self.key)):
return
PtFakeLinkAvatarToObject(PtGetLocalAvatar().getKey(), objSpawnPoint.value.getKey())
PtFadeOut(kFadeOutSeconds, 1)
PtAtTimeCallback(self.key, kTimerSeconds, 1)
def OnTimer(self, id):
if (id == 1):
PtFadeIn(kFadeInSeconds, 0)
# paste glue section here
Users browsing this forum: No registered users and 6 guests