trigger_changetarget
Post Reply
Quote
Re: trigger_changetarget
Posted by fizscy46 on Sun Nov 16th at 10:48pm 2003


I've never gotten how these work in large sequence.

For example. I've got a map with an elevator. You press the button, activating a multi_manager that makes the floor lights change, and the doors open and close. The elevator only goes down once the doors close if you are in the elevator. Someone on vlatitude solved this for me, but I don't really understand how it works (And nobody will answer it).

If you want to see the post its at http://www.vlatitude.com/phpBB2/viewtopic.php?t=6470

For the gist, its how do trigger_changetargets work?





Quote
Re: trigger_changetarget
Posted by Gollum on Sun Nov 16th at 11:14pm 2003


Trigger_changetargets are very, very simple. They have 3 keys. Let's suppose you want to change the target of an entity called "MyEntity" to "NewTarget".

Name: change1
Entity to affect: MyEntity
New Target: NewTarget

Now trigger "change1" with something. Note that you would need a separate changetarget in order to return your entity to its original target (you can't just toggle between them).

[addsig]




Quote
Re: trigger_changetarget
Posted by fizscy46 on Sun Nov 16th at 11:18pm 2003


OK, now I'm getting how my elevator works.

So like multisources, once on, they stay on.

In my elevator the trigger multiple in from of the door trigger change 1, and the one in the elevator triggers change 2.

So this makes it so that by going into the elevator, the multimanager is triggered via a relay, but by leaving, you trigger change 1 so the relay won't target anything





Quote
Re: trigger_changetarget
Posted by Dr Brasso on Mon Nov 17th at 12:51am 2003


they do not necessarily have to stay on...most anything can be shut off by a number of means, even if it includes an elaborate setup including delayed triggering with multimanagers etc........those which have killtargets in their contents will, kill targets....im sure their are exceptions, but..........Gollum? ///me passes buck...

Doc Brass...

[addsig]




Quote
Re: trigger_changetarget
Posted by fizscy46 on Mon Nov 17th at 3:25am 2003


I meant that it stays on until it is turned off. Most triggers are only on for a fraction of a second, they aren't on as long as you are in them (Which was why my original elevator wouldn't work)

Thanks guys





Quote
Re: trigger_changetarget
Posted by Gollum on Mon Nov 17th at 10:48am 2003


The only entities that have proper "on" and "off" states are multisources and env_globals. The global has an on/off state that can be read by a multisource, and the multisource can then be read by another entity (as a master).

Other entities such as func_doors do have "up" and "down" states, but they cannot be read by anything else.

All triggers are instantaneous; there is no continuous triggering in Half-Life. However, you can choose whether to send an "on" signal, an "off" signal or a "toggle" signal (though this is quite buggy in my experience). The killtarget is a special type of signal that kills the named entity (completely removes it from your map).

You can make the reset time on a trigger_multiple shorter, but it is still going to send a lot of discrete triggers rather than a continuous "on" signal. There is a cunning way to hack this in order to produce a continuous "on" signal, however It was one of my tutorials from the old site (was even linked to by the Handy Vandal!), but it's not here anymore.

[addsig]



Quote
Re: trigger_changetarget
Posted by fizscy46 on Mon Nov 17th at 12:58pm 2003


But in order for a multisource to remain on, don't the object(s) that target it have to remain on?



Quote
Re: trigger_changetarget
Posted by Gollum on Mon Nov 17th at 1:13pm 2003


Yes - good point! In the case of buttons, that is supposed to happen. I've never used this setup myself, but from what I read at the VERC, it's quite buggy and unreliable with multiple buttons. Globals all the way for me!

As a guess, most of the multi-button triggers in Half-Life were down using a trigger_counter (since generally the buttons stayed on). According to the VERC discussion, multisources actually end up acting pretty much like a trigger_counter anyway :/

[addsig]





Post Reply