problem with info_teleport_destinations

Skaruts

2008-11-24 05:57:39

While making my jumpmaps I made some trigger_teleports and info_teleport_destinations and it always worked fine. But I thought that if the map would be in a server there would be more persons playing it and it would need more teleport destinations to avoid getting stuck on each other. But while I have three destinations in one part of the map, I noticed that I'm always teleported to the same destination: the one I specified in the trigger_teleport's remote destination (obviously).

To get the situation where I found this problem, imagine a jumpmap, with 3 info_target_destinations (dest1, dest2, dest3) at the start of the stage, and a trigger_teleport directly below a sequence of platforms to bhop.
If I get teleported to dest1 and stay there, occupying it's space, the other person(s) will NOT get teleported to dest2, since I specified dest1 as the remote destination.

The question is: Using one trigger_teleport only, is there a way around this?

I thought about maybe specifying dest&i in the remote destination, but I'm not sure...
Btw, I never tried point_teleport nor info_target.

(can't try anything while I'm writing this due to being at work)

Sacrifist

2008-11-24 10:36:20

I havent looked at teleport logics in quite awhile, but you might be able to put 3 triggers (one infront of the next) and disable the first one for a short time after its used and so on. That way if 3 players ran through them they would each use a different trigger. This isnt going with what you want as it's using more then one trigger, but why should that matter if they are all a unit or 2 apart.

Skaruts

2008-11-24 11:09:35

:idea:
Well, in fact, that may be a solution. I said I wanted just one teleport only cuz I was thinking that putting more than one horizontally aranged in the length of the bhop sequence would possibilitate the usage of the same destination anyway. I tried it once and it's not so useful.

I'm not sure this was what you meant, but I may put them under each other, so I get the teleports all the same width and lenght. Like three layers of triggers.
Hmmm. I dont exactly know how to control their activation/ deactivation and all that, but I'll look into it.

All the tut's in the web are basic teleports contruction only :sketchy:

Any more ideas/solutions would be very welcome.
Thx a lot

boshed

2008-11-24 17:11:39

You can make a teleport cycle between destinations, but it requires a bit of entity work. In this example I'm using 3 teleport destinations and sending the player to each on in turn.

Entities needed:

1 x trigger_teleport (your teleport)
3 x info_teleport_destination (your teleport destinations)
3 x ai_changetarget (these make the teleport change its destination)
1 x math_counter (to cycle each destination in order)
1 x logic_case (to see which teleport destination to use)

Setup like so:

trigger_teleport

Code: Select all

name: teleport_001
remote destination: teleport_destination_001
outputs: 

	My output named: OnEndTouch
	Targets entities named: teleport_counter
	Via this input: Add
	With a parameter override of: 1
info_teleport_destination #1

Code: Select all

name: teleport_destination_001
info_teleport_destination #2

Code: Select all

name: teleport_destination_002
info_teleport_destination #3

Code: Select all

name: teleport_destination_003
ai_changetarget #1

Code: Select all

name: teleport_target_001
target entity: teleport_001
new target: teleport_destination_001
ai_changetarget #2

Code: Select all

name: teleport_target_001
target entity: teleport_001
new target: teleport_destination_002
ai_changetarget #3

Code: Select all

name: teleport_target_001
target entity: teleport_001
new target: teleport_destination_003
math_counter

Code: Select all

name: teleport_counter
initial_value: 1
minimum legal value: 1
maximum legal value: 4 (notice this is *one more* than your number of destinations)
outputs:

	My output named: OnHitMax
	Targets entities named: teleport_counter
	Via this input: SetValue
	With a parameter override of: 1

	My output named: OutValue
	Targets entities named: teleport_case
	Via this input: InValue
	With a parameter override of: <none>	


logic_case

Code: Select all

name: teleport_case
Case 01: 1
Case 02: 2
Case 03: 3
outputs:

	My output named: OnCase01
	Targets entities named: teleport_target_001
	Via this input: Activate

	My output named: OnCase02
	Targets entities named: teleport_target_002
	Via this input: Activate

	My output named: OnCase03
	Targets entities named: teleport_target_003
	Via this input: Activate

This works because:

1) every time you stop touching the trigger_teleport (onEndTouch) the math_counter has 1 added to to it.
2) the number on the math_counter is sent to the logic_case, which then fires the ai_changetarget.
3) the ai_changetarget fires and changes the target of the tigger_teleport.
4) when the math_counter hits 4 it resets itself back to 1 again, so the sequence of teleport destinations is 1->2->3->1->2->3 and so on.

Pic:

Image

>> Example VMF to download here <<

[EYE] Valar

2008-11-24 21:22:16

boshed wrote:You can make a teleport cycle between destinations, but it requires a bit of entity work. In this example I'm using 3 teleport destinations and sending the player to each on in turn.

Entities needed:

1 x trigger_teleport (your teleport)
3 x info_teleport_destination (your teleport destinations)
3 x ai_changetarget (these make the teleport change its destination)
1 x math_counter (to cycle each destination in order)
1 x logic_case (to see which teleport destination to use)

Setup like so:

trigger_teleport

Code: Select all

name: teleport_001
remote destination: teleport_destination_001
outputs: 

	My output named: OnEndTouch
	Targets entities named: teleport_counter
	Via this input: Add
	With a parameter override of: 1
info_teleport_destination #1

Code: Select all

name: teleport_destination_001
info_teleport_destination #2

Code: Select all

name: teleport_destination_002
info_teleport_destination #3

Code: Select all

name: teleport_destination_003
ai_changetarget #1

Code: Select all

name: teleport_target_001
target entity: teleport_001
new target: teleport_destination_001
ai_changetarget #2

Code: Select all

name: teleport_target_001
target entity: teleport_001
new target: teleport_destination_002
ai_changetarget #3

Code: Select all

name: teleport_target_001
target entity: teleport_001
new target: teleport_destination_003
math_counter

Code: Select all

name: teleport_counter
initial_value: 1
minimum legal value: 1
maximum legal value: 4 (notice this is *one more* than your number of destinations)
outputs:

	My output named: OnHitMax
	Targets entities named: teleport_counter
	Via this input: SetValue
	With a parameter override of: 1

	My output named: OutValue
	Targets entities named: teleport_case
	Via this input: InValue
	With a parameter override of: <none>	


logic_case

Code: Select all

name: teleport_case
Case 01: 1
Case 02: 2
Case 03: 3
outputs:

	My output named: OnCase01
	Targets entities named: teleport_target_001
	Via this input: Activate

	My output named: OnCase02
	Targets entities named: teleport_target_002
	Via this input: Activate

	My output named: OnCase03
	Targets entities named: teleport_target_003
	Via this input: Activate

This works because:

1) every time you stop touching the trigger_teleport (onEndTouch) the math_counter has 1 added to to it.
2) the number on the math_counter is sent to the logic_case, which then fires the ai_changetarget.
3) the ai_changetarget fires and changes the target of the tigger_teleport.
4) when the math_counter hits 4 it resets itself back to 1 again, so the sequence of teleport destinations is 1->2->3->1->2->3 and so on.

Pic:

Image

>> Example VMF to download here <<
do lunch sometime? what's your favorite color? do you like kids?

Skaruts

2008-11-24 22:54:42

why do you quote a whole post of this size just to add a sentence in the end?? Never understood that.

Anyway....
Really good. Didn't expect a such complete answer. Thank you so very much.
And now I know a few more entities I had never seen:
ai_changetarget
math_counter
logic_case


EDIT: you use the trigger output of OnEndTouched. I've always used OnTrigger or OnStartTouch. Is there a big diference between them?

boshed

2008-11-25 01:06:08

Skaruts wrote: EDIT: you use the trigger output of OnEndTouched. I've always used OnTrigger or OnStartTouch. Is there a big diference between them?
Depends if you want something to happen when you start touching it or finish touching it :)

In this case I'm using OnEndTouch to change the teleport destination after the player teleports away (being teleported will of course make you stop touching the trigger).

I'm not sure of how well it would work if you change the destination as soon as the player touches the trigger, the teleport might fire before the OnStartTouch event (server latency etc) so I chose to do it after they leave the trigger.

keefy

2008-11-25 01:49:05

My gosh you were not kidding when you said "I do geeky stuff with computers" :? :lol:

Jelly Fox

2008-11-25 04:00:35

Nice post Boshed :o
Skaruts wrote:why do you quote a whole post of this size just to add a sentence in the end?? Never understood that.

Anyway....
Really good. Didn't expect a such complete answer. Thank you so very much.
And now I know a few more entities I had never seen:
ai_changetarget
math_counter
logic_case


EDIT: you use the trigger output of OnEndTouched. I've always used OnTrigger or OnStartTouch. Is there a big diference between them?
He's Val, He's better than you, therefore he can do whatever he wants. :wink:

Sacrifist

2008-11-25 08:24:05

Yeah, my way is the redneck way. His is the proper way lol. Both will work, but I suggest going with the proper logics that boshed showed you.