One trigger, several outputs - Variable problem. [SOLVED]
I'm trying to create a variable, but honestly I have no idea how to.
I tried searching a little, but I didn't have much luck.
Ok, so I'm trying to create a simple system.
There will be various trigger_multiples with the same output:
Teleport player to the activated point.
There are three points to activate. When one point is activated, the others are deactivated.
How would a trigger_teleport know which info_landmark to teleport to, and how would I be able to change it, midgame?
How would I be doing that? I'm not going to be parenting it to a tracktrain am i?
Also, I came to think of another way.
I could teleport the player to a point where there will be 3 disabled teleporters. Each one teleporting to another landmark. Great! I think I'll be doing that
For the logic_case, set the case keyvalues to numbers in order. You'll need one output on the logic_case per teleport: OnCase01 teleport1 Teleport. Set the target entity for the point_teleport to "!activator".
You can then use SetValue on the math_counter to select which teleport will be triggered.
beecake wrote:
How would a trigger_teleport know which info_landmark to teleport to, and how would I be able to change it, midgame?
You can achieve this by changing the teleport destination point in the trigger_teleport by the input "AddOutput" each time you need to. Use some logic_relays to store the desired settings for each of those 3 scenarios. And use the following output:
- OnTrigger > [trigger_teleport_name_here] > AddOutput > target_destination point1
(Then "point2" and "point3" for the other 2 destination points)
NOTE: I'm not in front of my comp atm and I cannot check out if the keyvalue 'target_destination' is the correct one, please check out by disabling SmartEdit 
And if you don't need to change from level, don't use info_landmarks, but info_targets instead.
This thread is solved now, as I went with the solution where the player is teleported to a "teleport-control" destination. From there he will be teleported to the selected place.
Examples
Format: <key> <value>
{
"classname" "prop_physics"
"targetname" "prop01"
.
.
.
"OnHealthChange" "!self,AddOutput,targetname prop9001"
}
so i tried :
"OnFullyClosed" "shooting_linear,?AddOutput,?movedistance 400,?-1"
This didn't work. in case you didn't notice this is a func_movelinear.
any help would be appreciated
In future, use colons for the dilimeter instead of commas (it's different for ent_fire and hammer outputs.)