PDA

View Full Version : Syntax help with addoutput in hammer


Cactuschef
03-11-2010, 08:12 PM
I'm trying to add a teleporter to a map I'm working on, and I'm having trouble with it. I want to have the teleporter in question send subsequent players that enter it to different locations. I think I'm on the right track, but I'm hung up on one part. basically my setup is this:

red_tele_01 a trigger brush
-remote destination: red_dest_01

Outputs:
MyOutputNamed: OnStartTouch
Target Entity: red_tele_logic
Target Input: pickrandomshuffle

red_dest_01 & red_dest_02, two info_teleporter_destination's

red_tele_logic, a logic_case
this is where I'm stuck. basically I want to have two outputs, targetting red_tele_01, that overwrite "remote_destination" I just can't figure out the syntax here. so far I have 2 instances of:
MyOutputNamed: OnCase01 (and another for 2)
Target Entity: red_tele_01
Target Input: AddOutput
Parameter Override: ??

basically how do I set these outputs to replace the "remote destination" field in red_tele_01?

basically it should go
->player enters red_tele_01, is sent to red_dest_01
->red_tele_01 sends pickrandomshuffle to red_tele_logic
->red_tele_logic picks the next OnCase
->red_tele_logic overwrites red_tele_01's "remote destination"
->next player is sent to red_dest_02 and restarts the process

Cactuschef
03-11-2010, 08:56 PM
i keep trying to find tutorials on this but they all lead to an entity "ai_changetarget" which hammer tells me is obsolete :/

Xanoratt
03-12-2010, 12:19 AM
So if I'm understanding this correctly, you are trying to make a teleporter that sequentially teleports players to different locations, and then loops back to the first location?

Here is something that may work, though I haven't tried it myself:

Place a trigger_multiple (http://developer.valvesoftware.com/wiki/Trigger_multiple) where the teleport volume will be. Set its OnTrigger output to fire PickRandomShuffle on your logic_case. In the logic_case, set the OnCase outputs to fire the Teleport input on one of the various entities I'm about to explain next.

Create point_teleports (http://developer.valvesoftware.com/wiki/Point_teleport) at each of the destinations you desire. Set their targets to "!activator". Your OnCase outputs should each target a different point_teleport.

If my theory is correct, then:
The player will step into the trigger_multiple.
The trigger_multiple will trigger your logic_case.
Your logic_case will fire one of its OnCase outputs.
The point_teleport targeted by the OnCase output will teleport !activator.
If my knowledge of targetname keys is accurate, then !activator should be the player that stepped into your trigger_multiple.

If this doesn't work, then I can suggest another idea, though it's much more crude.

Cactuschef
03-12-2010, 01:52 AM
thank you, that worked perfectly. I had actually come up with a very crude workaround (using a single teleporter destination but putting it on a track that moved around the destination area to simulate multiple destinations) but this is exactly what I was going for. I might actually make a tutorial using the method you posted here because i found dozens of "multiple destination teleporter" tutorials that all referenced several obsolete entities or were incredibly overcomplicated.