Random Teleporters

Vork

L1: Registered
Oct 14, 2009
6
0
I am trying to make a system to randomly teleport after a trigger is activated.I tried attaching the teleporters to a point_template and then setting a logic_case to select one at randomly after a player touches a trigger multiple.I checked the client flag and it's on and the names are all correct.So either the method does not work and need a new one or I messed something up.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
Try using multiple trigger teleports that each point to their own teleport destination.
You then just disable all triggers except one and alternate which one is on randomly.
Could use a timer and a logic case to pick a case randomly that enables one and disables all other triggers once every n seconds.
You could also make it so that it's the triggers themselves that tell the logic case to pick another trigger to enable.

If you want it to be "sequencial" as in, you can't teleport twice at the same location but always in the same order, you can instead make each trigger disable itself, disable all other triggers but enable 1 chosen trigger.

MQ
 
Last edited:

Vork

L1: Registered
Oct 14, 2009
6
0
Explain step by step because It seems like u are saying what I did.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
What are you using the point template for?

Example:

3 triggers
3 teleport destination

Trigger 1 disables itself when touched and disables trigger 2, but enables trigger 3.
Trigger 3 disables itself when touched and disables trigger 1, but enables trigger 2.
Trigger 2 disables itself when touched and disables trigger 3, but enables trigger 1.

That means that player1 touches trigger1, gets teleported at destination1.
Player 2 then runs over the area and trigger 3 is now enabled, gets teleported at destination3. ..etc...

That's the sequencial method.

If you want it random, use the triggers to tell the logic case which sequence to chose.
You can use the same sequences than in the sequencial method but the logic case would do the randomization for you in its output.

MQ
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
I'm just recapping to make sure you've got it all right.
The teleporter model is not a valid destination for your trigger_teleports, you know that right?
From what you wrote, it looks like you're spawning the engineer teleporter model from a point_template and you want players to teleport to their location. Am I reading this properly?
Your trigger_teleports must point at teleport destinations. The point_templates would just be there to spawn the visual models.
 
Last edited:

Vork

L1: Registered
Oct 14, 2009
6
0
I tried 2 ideas by both removing the point template and using it but redoing the outputs neither make it work.

I have 10 func_teleporters stacked on a trigger multiple set to activate the logic case.The logic case enables one random teleporter which is set to 10 spots around the map with a destination.That did not work I tried a similar approach with the point_template as a middle and setting it to activate on spawn.
 

MoonQuake

L3: Member
Jul 18, 2009
111
21
func_teleporters don't exist.

Were you able to make 1 teleporter work? With just a basic setup of 1 trigger teleport and a destination?
Let's start at the beginning:

To teleport a person to a destination you need the following:

- 1 Trigger_teleport - It's like a triggle_multiple but in the properties you specify a destination where you want players to appear after they touch the trigger teleport.
http://developer.valvesoftware.com/wiki/Trigger_teleport

- 1 info_teleport_destination - It's a special entity used only as a destination marker. You give this entity a name (like teleport_1_destination) and you put that name in the trigger_teleport properties for the destination.
http://developer.valvesoftware.com/wiki/Info_teleport_destination

That's it. this should work. No visual representation of the teleporter or the destination, but at least teleporting should work. Tell me if the above works, then we'll make 10 of them and randomize them.
 

Vork

L1: Registered
Oct 14, 2009
6
0
FPv8P.png

cgBxq.png

DCAWz.png

tO8K2.png

e3PEO.png

u1ViJ.png
 
Last edited:

MoonQuake

L3: Member
Jul 18, 2009
111
21
You didn't answer my questions.

I need to know what doesn't work.

Can you teleport at all? [] Yes or [] No

Is your problem not being able to ForceSpawn an object? [] Yes or [] No
If yes, which object you want to ForceSpawn?

Please, just answer these questions.

Some help about spawning objects (not players) using a point_template:
http://developer.valvesoftware.com/wiki/Point_template

point_templates are used to spawn objects like a chair, a box, a gun. This is not a teleporter. It could only spawn the visual model of a teleporter without it actually being one.

Hope this helps.

MQ
 

Washipato

L3: Member
Jun 22, 2009
149
331
You can use the ai_changetarget entity. You can use this to change the teleport destination of a trigger_teleport to a new one. After every teleportation (OnStartTouch) use a logic_case to activate a random ai_changetarget and change the place where the player will be teleported. The ai_changetarget entity is not included in the default TF2's fgd, but you can find it in ABS's FGD
 

Vork

L1: Registered
Oct 14, 2009
6
0
I figured it out after u said the abs fdg I had it once but it was lost with all my os reinstall(stupid computer)