Game Development Community

teleports

by Desmond Fletcher · in Torque Game Engine · 04/26/2002 (9:58 am) · 23 replies

Does anyone have a script or method for teleporting a player from one position to another?
Page «Previous 1 2
#1
07/06/2002 (8:27 am)
has anyone tried doing teleports yet? how about grapple hooks?
#2
07/06/2002 (9:34 am)
Hehe, yes, just did it after reading this post... actually it's pretty easy... here is a pic showing two yellow "magic teleporters" (I took the yellow animated dts shapes out of the latest RWTA build - hope you can forgive me, Phil... ;-) which "beam" you from one to the other... I've also added some particle effects and sounds to the actual trigger event...
Lemme write down what I did (well, its only 2 dts files, 2 triggers, some particless and a little function swapping locations) and I can post it with the files I used, if you want...
Later!
#3
07/06/2002 (11:14 am)
Yes! Great Stefan! Can you post the scripts?
#4
07/06/2002 (11:16 am)
Sure! But for now, here are screens with some particle effects... and sound, hehe... ;-)
Give me some time and I'll post a little tutorial and all the files... :-)
#5
07/06/2002 (11:59 am)
Funny really, that was what I was going to do with those yellow things the other day. Never got round to it. Good work Stefan! :))

Phil.
#6
07/06/2002 (12:04 pm)
Hehe, hope you dont mind I used those... ;-)
#7
07/06/2002 (1:37 pm)
Puh, it's done... check it out in our tutorial section...
guess I'll also submit it here at GG... kinda slow and quiet here atm...
Enjoy folks!
#8
07/06/2002 (1:56 pm)
Okay, finally submitted it on GG, too... www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2930!
Good nite now... 8-0
#9
07/07/2002 (2:50 pm)
Desmond, Phil, I just updated the tutorial/zip with a new multiTeleportTrigger.cs file - to increase the fun factor I've added support for multiple triggers - as many as you want! :-)
check out the above links to get it if you want! ;-)
#10
07/08/2002 (6:49 am)
right on stef, i was thinking it was just me (still not totaly understanding how the script works)

do you think this will work by creating platforms in quark4torque and ingame as interior instances, instead of in max and static shapes?

i will try your up dates when i get off work

thanks
#11
07/08/2002 (7:15 am)
Ace-
the static shape I'm using here is only "eye-candy", the only important thing is the trigger... it is responsible for, well, triggering the event and the script is "beaming" you to the location of the triggers... so it's using the "position" value of the triggers to get the target location ...
So it doesn't matter at all what you put "underneath" or around the trigger object... the script would work if you set up only the triggers (and name them correctly), too...
All the other stuff besides the triggers is really only eye-candy...
If all this sounds confusing it probably is caused by my explanations :-P, so the short answer is: Yes! You can use whatever object you want to "decorate" the teleports... :-)
#12
07/08/2002 (5:35 pm)
heh, ok, i guess ill soon find out, and this will be invaluable for any fps game

thanks
#13
07/08/2002 (11:26 pm)
Hm, I was thinking about letting the player choose where to go and which trigger to set as target...
but I'm not sure how this should look?
Pop up a Gui and let him select? But if he can select

Target:
Trigger1
Trigger2
Trigger3

doesn't give him any information about the locations, etc. ...
so I was thinking about using Frank B.'s MapGui and maybe render some markers where the triggers are and their names above them... but first, I have to find out how to find TriggerObjectTypes in C++ (see my thread for it)... any other ideas?
#14
07/09/2002 (5:19 am)
Thinking of something like what's in Diablo II? The player can pick the teleport location (if they've activated it) by using a gui screen. That would be a cool feature.
#15
07/09/2002 (3:33 pm)
Okay, got it working! :-)
Still needs some work, and the GUI is a mess ;-), but you should get the idea...
And I have to do some multiplayer testing first , I guess...

So basically I've written a new C++ class (guiTeleportCtrl) based on Frank Bignone's MapGui which I've already "tuned" to show interiors and other players/bots...
this one now also shows the "TeleportTrigger"s (name comparison!), which are red on this pic - the little black outlined rectangles are interiors, the two white dots are bots running around and the little white arrow above "Target 3" is the player... you can turn interior and enemy rendering on/off, and you can adjust all the colors (triggers, text, interiors, background, ...) via script... and the rest of the GUI is completely up to you... I just threw some bitmaps together, so there is no such thing as "design" in this 1st version... :-P

The GUI pops up as soon as you enter a trigger, but the teleporting only starts if you click on one of the "Target" text fields on the right...
guess I can post this within the next 1-2 days if anyone'S interested...
#16
07/09/2002 (5:26 pm)
Excellent work Stefan. :)

Your making some nice progress with scripting .

Keep it up
#17
07/09/2002 (6:35 pm)
Excellent Stefan! As Ian says, you're doing awesoem work.
#18
07/10/2002 (2:19 am)
Thanks guys!! :-))
Well, I've written a little tutorial explaining the new
"Teleport Gui", you can find it in the "Tutorials" section of our website ...
I couldn't test it in Multiplayer yet, but there shouldn't be any problems...
all the necessary file are available as zip, so you should be ready to go after downloading!
Let me know if you have any problems!
Have fun! :-)
#19
03/06/2003 (8:41 am)
are links broken? I can't follow any of the given URLs.

Cheers,

Isi
#20
03/06/2003 (8:45 am)
Try here:

tork.zenkel.com/tutorials/teleport/teleport.php

Is that the one you're looking for?
Page «Previous 1 2