Mapping/Scripting: Teleporters.

i am going to show you how to make a teleporter in your map.. this is quite a simple method there are other ways but this is by far the most simplistic. ok.. so.

firstly select your trigger texture. do this by going to textures -> usage -> tools Look for gray texture that says "trig" all over it.Okay, now draw a brush making sure that the box your drawing is more that 16 units each direction on the axis. x,y,z. (otherwise the trigger wont work*). also note that if the trigger in overlapping inside something it also wont work**.Eight now there are several types of teleporter you can use. this is defined in the trigger entity box and in your maps .GSC file. now when i said there are different versions of teleports its differed by a few things. whether you just want to walk into the trigger and it teleports you, or if you want to press a button then you can or if you have a damage trigger that you can do damage to and hey presto you are magically teleported.So 3 ways i will show you very simple to do. For the walk into and teleport its simply a case of right clicking on your 2d view select trigger multiple. select the brush opening up your entity box by pressing N twice then entering the values.

See below

Code:

Key: classnameValue: trigger_multiple

Key: targetnameValue: teleport

and for a teleport that you can press a button for its a follows

Code:

Key: classnameValue: trigger_use

Key: targetnameValue: teleport

and for a teleport that makes you teleport when u do damage for it is like this

Code:

Key: classnameValue: trigger_damage

Key: targetnameValue: teleport

there are certain ways you can customise the damage you will notice there are little boxes that show up now you have a trigger damage box. like below...

Now Right Click on the 2D Grid and go to Script -> OriginAdd one of these to wherever you want to teleport too, if you rotate this origin, you will get rotated in to the direction it's facing.

if you need help just ask ofc. right.. now the boring part the script. its quite simplistic copy and paste this in to your maps .gsc file.. if you dont have one make a .txt file on your desktop rename it to your map. eg mp_yourmapname.gsc then open it up..

paste this inside:

Code:

main(){ //EVERYTHING YOU HAVE IN MAIN THREAD GOES HERE thread teleportenter();}