Teleporter question

Started by Timmycakes mapper
14/05/2011 19:01
Page 1 of 1
Timmycakes mapper14/05/2011 19:01

I have a friend who wants to know if it is possible to make a teleporter that takes you to 2 different spots, but alternates between the 2 spots each time a player steps in.

i know you can make a "random" teleporter, this one is not random. For example, player 1 goes into the teleporter and ends up at "A", player 2 then goes into the teleporter and ends up at "B", player 3 goes in and arrives at "A", player 4 goes in and arrives at "B", etc etc etc...see what i mean? Alternating.

with a "random" teleporter the sequence of destinations might be A A B A B A B B B. I want a teleporter that will give me A B A B A B.

i hope this makes sense :P

dEMolite mapper14/05/2011 20:33(edited 14/05/2011 20:34)

just out of the theory it might need some work tho.

1x trigger_teleporter
2x info_teleport_destination
2x trigger_changetarget
2x multisource

theory -> trigger_teleport triggers info_teleport_destination -> info_teleport_destination triggers multisource -> multisource triggers trigger_changetarget -> trigger_changetarget -> changed target from trigger_teleport to second info_teleport_destination -> and so on.

maybe that theory is wrong and let only the trigger_teleport trigger the multisource for new destination should work. its just only theory but it should give you some hints how it can be done.

plowed14/05/2011 21:09(edited 14/05/2011 21:10)

http://www.gimli-maps.de/?cat=mapping&sub=hl1&id=20 a very good tutorial for random generator and easy too. Its in german but you can translate it :)

I guess its pretty easy to include the trigger_changetarge. good luck

Ovidiu Dumitru15/05/2011 00:10(edited 15/05/2011 00:13)

Can't it be done inception style ? A trigger within a trigger ?

1st (original) trigger will handle the actual teleporting
and
2nd trigger will handle the counting of how many people have stepped in the 1st trigger, by sorting them, like:
odd no. (1st, 3rd, 5th, etc.) - destination A
even no. (2nd, 4th, 6th, etc.) - destination B

Maybe this is too complex for the engine though...

dEMolite mapper15/05/2011 00:36

then it would be the first theory of mine which i posted up with 2x game_counter & 1x game_counter_set

but are the 3 entities worth it?

spr1n mapper15/05/2011 15:11(edited 15/05/2011 22:23)

Originally posted by Timmycakes
I have a friend who wants to know if it is possible to make a teleporter that takes you to 2 different spots, but alternates between the 2 spots each time a player steps in...


of course its possible. It could be done different ways. At 1st we would need to make entities that are mostly required for this:
[blockquote]trigger_teleport - Teleport
-name tele01 - set a name so we can change its destination
-target tele01_A - initial destination
-netname(target path) tele01_go - trigger something after teleporting

info_teleport_destination - Destination A
-name tele01_A

info_teleport_destination - Destination B
-name tele01_B

trigger_changetarget - Change teleport destionation to A
-name tele01_set_A
-target tele01
-value tele01_A

trigger_changetarget - Change teleport destionation to B
-name tele01_set_B
-target tele01
-value tele01_B[/blockquote]
now we have to name something tele01_go and make it to change destinations each time. One of the easiest solutions I came up is making trigger_relay to switch itself (so each time its new changetarget) and teleport destination like that:
[blockquote]trigger_relay
-name tele01_go
-target tele01_set_B

trigger_changetarget
-name tele01_set_A
-target tele01_go
-value tele01_set_B

trigger_changetarget
-name tele01_set_B
-target tele01_go
-value tele01_set_A[/blockquote]

But there is even shorter solution if we would change teleport destination each time to B, and every second time to A with a little delay (so changing to B and A will not collide):[blockquote]trigger_teleport
-name tele01
-target tele01_A
-netname tele01_go

info_teleport_destination
-name tele01_A

info_teleport_destination
-name tele01_B

trigger_changetarget
-name tele01_set_A
-target tele01
-value tele01_A

trigger_changetarget
-name tele01_go
-target tele01
-value tele01_B


game_counter
-name tele01_go
-target tele01_set_A
-dalay 0.01
-initial 0
-limit 2
+reset on fire
[/blockquote]


PS. of course it can be done with multisource(s), 2 game_counters and even with two teleports... though imo those methods I made are most optimal. 2 game_counters could be a good solution too, but then one of them should be triggered once at map start (trigger auto)(so they trigger every second time something different... even and odd), and that means those two should have different names and one more entity to trigger them both (trigger_multiple) ... 9 entities in total

dEMolite mapper15/05/2011 17:56

ah yea those are the better solutions. now it comes out how long i am not mapping anymore ^^

Page 1 of 1

Please log in to post replies.