Please or Register to create posts and topics.

One trigger, several outputs - Variable problem. [SOLVED]

Hey there.

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?

Mostly lurking

You could move the target point around, or have multiple triggers at each source which are enabled and disabled, or have teleporters on each destination point in a cyclic arrangement and deactivate the one at the destination you want to use (so when the player teleports to the wrong one, they're teleported again until they come to the one with the disabled trigger).

Falsi sumus crusto!

Moving the target seems like the easiest and least complicated way.
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

Mostly lurking

Alternatively you could have a point_teleport at each location, a math_counter and a logic_case. For the trigger_multiples, OnStartTouch math_counter > GetValue; OnGetValue logic_case InValue.
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.

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]
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.

ImageImageImageImageImageuseful tools and stuff here on TWP :thumbup:
[spoiler]ImageImageImageImageImage[/spoiler]

Well, thank you very much for the answer. Now i actually understand what the addoutput is for :)

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.

Mostly lurking

I'm tring to use a "AddOutput" to change a key value like this examplp
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

I don't believe that modifing movelinear distances works, but instead you could just use the SetPosition input. Even though it says to use 0-1, any number works. Negatives make it move backwards, and numbers greater than 1 make it move in multiples of the movement distance (ie SetPosition 2 makes it move twice as far).

In future, use colons for the dilimeter instead of commas (it's different for ent_fire and hammer outputs.)

My stuff:
[spoiler]- BEE2 Addons | (BEE2)
- Hammer Addons
Maps:
- Crushed Gel
- Gel is Not Always Helpful[/spoiler]