I assume the link is done automatically on entering a region or clicking something ? (not a book, I mean)
Then you could try using this script:
- Show Spoiler
- Code: Select all
from Plasma import *
from PlasmaTypes import *
from PlasmaKITypes import *
from PlasmaConstants import *
# things that will show up in Max
activator = ptAttribActivator(1, "Activator: Clickable or trigger region")
spawnPoint = ptAttribSceneobject(2, "Spawn point to fakelink to", "")
class xSimpleFakelink(ptResponder):
def __init__(self):
ptResponder.__init__(self)
self.id = 46343 # whatever you want here
self.version = 1
def OnNotify(self, state, id, events):
if id == activator.id: # is the event coming from the clickable/region ?
if PtFindAvatar(events) == PtGetLocalAvatar(): # is our avatar the one triggering the clickable/region ?
if PtWasLocallyNotified(self.key) and state: # is this event send by us or the server ?
print "Simple fakelink: triggered the activator, now fakelinking with screen fadeout..."
self.ILink()
def ILink(self):
PtFakeLinkAvatarToObject(PtGetLocalAvatar().getKey(), spawnPoint.value.getKey()) # linking
PtFadeOut(1.5, 1) # darken screen
PtAtTimeCallback(self.key, 1.5, 1) # come back later to un-darken the screen
def OnTimer(self, id):
if id == 1:
print "Simple fakelink: Fading back in..."
PtFadeIn(1.5, 1) # remove black screen
Don't forget to add the Python glue at the end of the file, and it should work in Max. I didn't test the script, though. Hopefully it will work without problem...
It will even handle the screen fadein/fadeout when linking.
Oh, and don't forget fakelinking doesn't reset the camera position. Meaning when linking the third person view will fly all across your Age. This can be solved by setting up a camera region where you link to, and set it to cut position, IIRC.