Plan for Daniel Allessi
by Daniel Allessi · 03/19/2005 (10:33 am) · 4 comments
I just finished adding in the teleporters for my platformer. No offense to whoever wrote the teleporter resource on here, but it was lacking for my needs.
I had to add a callback in the engine so ::onAdd will be called for triggers, but other than that, all script. The system generate a new ID for every teleporter (and accounts for teleporters you may have already saved in the mission file). You specify the ID of the teleporter pad it will take you to, or if the pad is receive-only, and voila. It won't bounce you back and forth between teleporters since it remembers the last teleporter you were on (which is reset when you leave a trigger area).
They work wonderfully, and the only things I need to make them perfect for my game is the ability to specify if the player has to press a USE key to teleport (right now they just teleport you on entering) and making the camera smoothly pan to the destination location.
All you need to change in an existing codebase are the one-line addition to the engine, a call to teleportTrigger::registerMissionPads() from your onMissionLoaded function, and add a lastTeleporter field to the players allowed to use the teleporters.
I am considering adding them as a resource but I'm still unhappy about the fact that my last resource from Mar 7th was never approved, nor was I told why.
I had to add a callback in the engine so ::onAdd will be called for triggers, but other than that, all script. The system generate a new ID for every teleporter (and accounts for teleporters you may have already saved in the mission file). You specify the ID of the teleporter pad it will take you to, or if the pad is receive-only, and voila. It won't bounce you back and forth between teleporters since it remembers the last teleporter you were on (which is reset when you leave a trigger area).
They work wonderfully, and the only things I need to make them perfect for my game is the ability to specify if the player has to press a USE key to teleport (right now they just teleport you on entering) and making the camera smoothly pan to the destination location.
All you need to change in an existing codebase are the one-line addition to the engine, a call to teleportTrigger::registerMissionPads() from your onMissionLoaded function, and add a lastTeleporter field to the players allowed to use the teleporters.
I am considering adding them as a resource but I'm still unhappy about the fact that my last resource from Mar 7th was never approved, nor was I told why.
About the author
#2
03/19/2005 (11:55 am)
Ah, cool cool. I'll see about writing this up then. :P
#3
03/19/2005 (2:49 pm)
March 7th was GDC. Since we got back, nearly everybody is sick. I don't think anybody has even looked at resource approval in the last two weeks.
#4
03/19/2005 (3:45 pm)
No biggie Jeff, I was moreso just excited about finally being able to do a resource. :) 
Torque Owner Erik Madison