Re: trigger_changetarget
Posted by Gollum on
Sun Nov 16th 2003 at 11:14pm
Posted
2003-11-16 11:14pm
Gollum
member
1268 posts
525 snarkmarks
Registered:
Oct 26th 2001
Occupation: Student
Location: Oxford, England
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).
Re: trigger_changetarget
Posted by fizscy46 on
Sun Nov 16th 2003 at 11:18pm
Posted
2003-11-16 11:18pm
334 posts
72 snarkmarks
Registered:
Nov 16th 2003
Location: Toronto, Canada
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
Re: trigger_changetarget
Posted by fizscy46 on
Mon Nov 17th 2003 at 3:25am
334 posts
72 snarkmarks
Registered:
Nov 16th 2003
Location: Toronto, Canada
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
Re: trigger_changetarget
Posted by Gollum on
Mon Nov 17th 2003 at 10:48am
Posted
2003-11-17 10:48am
Gollum
member
1268 posts
525 snarkmarks
Registered:
Oct 26th 2001
Occupation: Student
Location: Oxford, England
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 :biggrin: It was one of my tutorials from the old site (was even linked to by the Handy Vandal!), but it's not here anymore.
Re: trigger_changetarget
Posted by fizscy46 on
Mon Nov 17th 2003 at 12:58pm
Posted
2003-11-17 12:58pm
334 posts
72 snarkmarks
Registered:
Nov 16th 2003
Location: Toronto, Canada
But in order for a multisource to remain on, don't the object(s) that target it have to remain on?
Re: trigger_changetarget
Posted by Gollum on
Mon Nov 17th 2003 at 1:13pm
Gollum
member
1268 posts
525 snarkmarks
Registered:
Oct 26th 2001
Occupation: Student
Location: Oxford, England
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! :biggrin:
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 :/