Mr Neutron
Newbie
- Joined
- Sep 3, 2003
- Messages
- 484
- Reaction score
- 0
Here's the 13 logic entities, which I've just revised for my entity guide (see the sticky thread to download a proper formatted copy; go to last post there). Check them out and see if you have any questions (or answers!).
logic_auto
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Fires OUTPUTS when a map spawns. If 'Remove on fire' flag is set the logic_auto is deleted after firing. It can be set to check require one global state to be on in order to fire. This allows you to only fire events based on what took place in a previous map. The entity does NOT change these states, only checks for them. Notice also that the outputs are mutually exclusive: only one can happen each time you load the map.
Global State to Read globalstate <choices> If set, this specifies a global state to check before firing.
CHOICES
Antlions are player allies: in the SP, when Gordon can direct
Citizens are *not* player allies (cannot be commanded):
Don’t spawn seagulls on the jeep: [?? Quoi??? You heard the man. ??]
Friendly encounter sequence (lower weapons, etc.):
Gordon is invulnerable: [?? this what is affected by the God command? or something else??]
Gordon pre-criminal: in the SP, Gordon is pre-criminal at the trainstation and a criminal starting with the rooftop chase; by default, combine don’t attack
Player in APC is disguised as combine:
Suit sprint function not yet enabled:
Super phys gun is enabled: player has the white phys gun that picks up and blasts combine
1: Remove on fire: ON. Killed after firing. [?? If multiple connections are made, do they all fire before the entity is killed??]
OUTPUTS
OnBackgroundMap the map loaded as a background to the main menu.
OnLoadGame the map loaded from a saved game.
OnMapSpawn the map loaded for any reason (this one requires the ‘global state to read’ property to have some choice other than ‘none’)
OnMapTransition the map loaded due to a level transition.
OnNewGame the map loaded to start a new game.
logic_autosave: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Invokes an autosave when triggered.
Force New Level Unit NewLevelUnit <yes/no> If yes, the save will discard any savedata from previous levels for the purpose of keeping savegame filesizes down. Should only be used if there is no way for the player to return to previous levels, for if the previous level isn’t setup properly to accommodate a player backtracking to it, interactive features easily could not work properly. [?? Could the game crash ??]
INPUTS
Save Force an autosave.
logic_branch: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
For holding and receiving a boolean value and firing either OnTrue or OnFalse when tested based on that value. The value initially specified in value should be 1 or 0, but any non-zero value fed to SetValue or SetValueTest will be set as 1. (This is like C, where any non-zero number represents true and 0 represents false.)
By itself, useful for branching between two potential sets of events.
Initial value InitialValue <integer> Initial value for the boolean value (0 or 1).
INPUTS
SetValue <bool> Set the boolean value.
SetValueTest <bool> Set value, then Test (see below).
Test Fire OnTrue or OnFalse based on the current value.
Toggle Toggle the boolean value between true and false.
ToggleTest Toggle, then Test. (see Test above)
OUTPUTS
On[False, True] <bool> INPUT Test reported a [false, true] value. [?? Sends 1 or 0, not value??]
logic_case: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 2004
Give names (string values) to up to 16 cases. When INPUT InValue receives a matching string, it fires the corresponding OnCase[01-16]. Example:
If …
Case05 = “rubberducky”
then…
SomeOutput <”rubberducky”> InValue
produces…
Case05 SomeInput
NOTE: familiarize yourself with the concept of parameter override (see top)!
Case [01-16] Case[01-16] <string>
INPUTS
InValue <string> Look for a matching string in the case values and fire the corresponding output, if any.
PickRandom Randomly fire one of the OnCase OUTPUTS that has at least one connection.
OUTPUTS
OnCase[01-16] see InValue (above).
OnDefault no match found for InValue (above)
logic_choreographed_scene: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Manages a choreographed scene (specified by ‘Scene file’) of one or more actors.
If an Actor is talking… busyactor <choices> What to do if an actor this scene needs is already talking when this scene is told to start.
CHOICES
Default: [?? Don’t wait for actor to finish? ??]
Wait for actor to finish:
Scene file SceneFile <scene> Scene file [?? What extension ??] this entity choreographs.
Target [1-8] target1 <target_destination> [?? Anyone know???]
INPUTS
Cancel Stops scene in progress.
InterjectResponse <string> Finds an actor who can respond to the specified concept string while the scene continues playing
Pause
Resume
Start [?? Will this restart the scene if it’s already going ??]
StopWaitingForActor Stop current speaker and move on to next action.
OUTPUTS
OnCanceled scene canceled
OnCompletion scene completed
OnStart scene started
OnTrigger[1-8] [?? Anyone know???]
logic_collision_pair
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Enables/disables vphysics collisions between two target entities.
Attachment 1 attach1 <target_destination> First entity.
Attachment 2 attach2 <target_destination> Second entity.
Start with collisions disabled startdisabled <Yes/No>
INPUTS
[Disable, Enable]Collisions [Disable, Enable] collisions between the two attachments.
logic_compare: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Holds two values and fires the appropriate OUTPUT when a comparison is made of the two.
[?? Why are the values in the properties integers but treated as floats in the inputs and outputs??]
Initial value InitialValue <integer> 1ST value
Compare value CompareValue <integer> other value with which to compare it
INPUTS
Compare Fire appropriate output given the current values.
SetValue <float> Set 1st value.
SetCompareValue <float> Set compare value.
SetValueCompare <float> Set 1st value AND then Compare [sheesh, talk about confusing naming there]
OUTPUTS
OnEqualTo <float> 1st and compare values equal. Sends 1st value as parameter.
OnNotEqualTo <float> 1st and compare value NOT equal.
OnGreaterThan <float> 1st > compare value . Sends 1st as parameter.
OnLessThan <float> 1st < 2nd . Sends 1st value as parameter.
logic_lineto: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Calculates and OUTPUTS a vector from one entity to another.
[End, Start] entity source <target_destination> The two entities which are the endpoints. (Because a vector is directional, it matters which one you specify as the start and which the end.)
OUTPUTS
Line <vector> Vector changes. Passes along the vector as a parameter. [?? Isn’t this processor intensive if the two entities are often or even constantly moving??]
logic_measure_movement: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
The movement of ‘Entity to Measure’ relative to ‘Measure Reference’ is mirrored by ‘Entity to Move’ relative to ‘Movement Reference’, but with the distance/speed divided by ‘Movement Scale’. [?? What about mimicking rotation??]
[??must the value be used to move something or can it be redirected for another purpose? This eneity could use a revision of its smartedit identifiers??]
Entity to Measure MeasureTarget <target_destination> Entity whose movement you want to measure.
Measure Reference MeasureReference <target_destination> The movement of Entity to Measure will be measured relative to this entity.
Entity to Move Target <target_destination> This entity will be moved to mimic the motions of Entity to Measure.
Movement Reference TargetReference <target_destination> The Entity to Move will move relative to this entity.
Measurement Type MeasureType <choices>
CHOICE
Postion: [??]
Eye position: [??]
Movement scale TargetScale <float> divisor by which to divide the measured movements. (1: movment is equal; 2: cut in half; .5: twice as fast, etc.)
INPUTS
SetMeasureTarget <string>
SetMeasureReference <string>
Target <string> Set the ‘Entity to Move’
SetTargetReference <string>
SetTargetScale <float>
[Enable, Disable]
logic_multicompare: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Remembers each InputValue <integer> it receives until CompareValues is called and then sends the appropriate OUTPUT, OnEqual (all the same input) or OnNotEqual (at least one was different from the rest). A call of CompareValues clears the set of values to be compared for the next CompareValues.
[?? Someone check this. I’m guessing here. What would happen when CompareValues is called but no values have been input (and Should use Integer Value is ‘no’)??]
Integer Value (optional) IntegerValue <integer>
Should use Integer Value ShouldComparetoValue <Yes/No> Yes, if the value specified in IntegerValue is to be considered part of the set for every CompareValues. If no, the set of values is empty after a CompareValues call.
INPUTS
CompareValues
InputValue <integer> Add another integer for the next CompareValues.
OUTPUTS
OnEqual
OnNotEqual at least one value different from the rest
logic_navigation: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Force NPC’s to ignore an entity when navigating.
Nav Property navprop <choices>
CHOICES
NPC’s Ignore this when navigating (they’ll bump into it): very strange that there’s only one choice here; perhaps additional choices were to be added later but never were
Navigation Entity target <target_destination>
1: Start On: ON
INPUTS
TurnOff Navigation Entity’s navigation properties returned to its own control.
TurnOn Navigation Entity uses the properties specified here.
Toggle
logic_relay: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
A message forwarder. Fires an OnTrigger output when triggered, and can be disabled to prevent forwarding OUTPUTS.
Useful as an intermediary between one entity and another for turning on or off an I/O connection, or as a container for holding a set of OUTPUTS that can be triggered from multiple places.
[?? Anyone think of something useful to do with this ??]
Start Disabled…
1: Only trigger once: OFF
2: Allow fast retrigger: OFF
INPUTS
CancelPending Cancel any events fired by this relay that are currently pending in the I/O event queue.
Trigger Trigger the relay, causing its OnTrigger output to fire if it is enabled.
[Enable, Disable]
Toggle
OUTPUTS
OnTrigger Trigger INPUT fired.
logic_timer: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Fires a timer event at regular, or random, intervals. It can also be set to oscillate betweena high and low end, in which case it will fire alternating high/low OUTPUTS each time it fires.
Start Disabled…
Refire Interval RefireTime <string> If 'Use Random Time' isn't set, this is the time between timer fires, in seconds.
Use Random Time UseRandomTime <Yes/No>
[Maximum, Minimum] Random Interval UpperRandomBound <string> If 'Use Random Time' is set, this is the maximum time between timer fires. The time will be a random number between the minimum and maximum specified.
1: Oscillator (alternates between OnTimerHigh and OnTimerLow OUTPUTS): OFF
INPUTS
FireTimer
RefireTime <integer> Set a new Refire Interval.
[Lower, Upper]RandomBound <float> Set a new boundary for the interval.
[Enable, Disable]
Toggle
OUTPUTS
OnTimer Fired when the timer expires.
OnTimerHigh Fired every other time for an oscillating timer.
OnTimerLow Fired every other time for an oscillating timer.
logic_auto
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Fires OUTPUTS when a map spawns. If 'Remove on fire' flag is set the logic_auto is deleted after firing. It can be set to check require one global state to be on in order to fire. This allows you to only fire events based on what took place in a previous map. The entity does NOT change these states, only checks for them. Notice also that the outputs are mutually exclusive: only one can happen each time you load the map.
Global State to Read globalstate <choices> If set, this specifies a global state to check before firing.
CHOICES
Antlions are player allies: in the SP, when Gordon can direct
Citizens are *not* player allies (cannot be commanded):
Don’t spawn seagulls on the jeep: [?? Quoi??? You heard the man. ??]
Friendly encounter sequence (lower weapons, etc.):
Gordon is invulnerable: [?? this what is affected by the God command? or something else??]
Gordon pre-criminal: in the SP, Gordon is pre-criminal at the trainstation and a criminal starting with the rooftop chase; by default, combine don’t attack
Player in APC is disguised as combine:
Suit sprint function not yet enabled:
Super phys gun is enabled: player has the white phys gun that picks up and blasts combine
1: Remove on fire: ON. Killed after firing. [?? If multiple connections are made, do they all fire before the entity is killed??]
OUTPUTS
OnBackgroundMap the map loaded as a background to the main menu.
OnLoadGame the map loaded from a saved game.
OnMapSpawn the map loaded for any reason (this one requires the ‘global state to read’ property to have some choice other than ‘none’)
OnMapTransition the map loaded due to a level transition.
OnNewGame the map loaded to start a new game.
logic_autosave: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Invokes an autosave when triggered.
Force New Level Unit NewLevelUnit <yes/no> If yes, the save will discard any savedata from previous levels for the purpose of keeping savegame filesizes down. Should only be used if there is no way for the player to return to previous levels, for if the previous level isn’t setup properly to accommodate a player backtracking to it, interactive features easily could not work properly. [?? Could the game crash ??]
INPUTS
Save Force an autosave.
logic_branch: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
For holding and receiving a boolean value and firing either OnTrue or OnFalse when tested based on that value. The value initially specified in value should be 1 or 0, but any non-zero value fed to SetValue or SetValueTest will be set as 1. (This is like C, where any non-zero number represents true and 0 represents false.)
By itself, useful for branching between two potential sets of events.
Initial value InitialValue <integer> Initial value for the boolean value (0 or 1).
INPUTS
SetValue <bool> Set the boolean value.
SetValueTest <bool> Set value, then Test (see below).
Test Fire OnTrue or OnFalse based on the current value.
Toggle Toggle the boolean value between true and false.
ToggleTest Toggle, then Test. (see Test above)
OUTPUTS
On[False, True] <bool> INPUT Test reported a [false, true] value. [?? Sends 1 or 0, not value??]
logic_case: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 2004
Give names (string values) to up to 16 cases. When INPUT InValue receives a matching string, it fires the corresponding OnCase[01-16]. Example:
If …
Case05 = “rubberducky”
then…
SomeOutput <”rubberducky”> InValue
produces…
Case05 SomeInput
NOTE: familiarize yourself with the concept of parameter override (see top)!
Case [01-16] Case[01-16] <string>
INPUTS
InValue <string> Look for a matching string in the case values and fire the corresponding output, if any.
PickRandom Randomly fire one of the OnCase OUTPUTS that has at least one connection.
OUTPUTS
OnCase[01-16] see InValue (above).
OnDefault no match found for InValue (above)
logic_choreographed_scene: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Manages a choreographed scene (specified by ‘Scene file’) of one or more actors.
If an Actor is talking… busyactor <choices> What to do if an actor this scene needs is already talking when this scene is told to start.
CHOICES
Default: [?? Don’t wait for actor to finish? ??]
Wait for actor to finish:
Scene file SceneFile <scene> Scene file [?? What extension ??] this entity choreographs.
Target [1-8] target1 <target_destination> [?? Anyone know???]
INPUTS
Cancel Stops scene in progress.
InterjectResponse <string> Finds an actor who can respond to the specified concept string while the scene continues playing
Pause
Resume
Start [?? Will this restart the scene if it’s already going ??]
StopWaitingForActor Stop current speaker and move on to next action.
OUTPUTS
OnCanceled scene canceled
OnCompletion scene completed
OnStart scene started
OnTrigger[1-8] [?? Anyone know???]
logic_collision_pair
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Enables/disables vphysics collisions between two target entities.
Attachment 1 attach1 <target_destination> First entity.
Attachment 2 attach2 <target_destination> Second entity.
Start with collisions disabled startdisabled <Yes/No>
INPUTS
[Disable, Enable]Collisions [Disable, Enable] collisions between the two attachments.
logic_compare: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Holds two values and fires the appropriate OUTPUT when a comparison is made of the two.
[?? Why are the values in the properties integers but treated as floats in the inputs and outputs??]
Initial value InitialValue <integer> 1ST value
Compare value CompareValue <integer> other value with which to compare it
INPUTS
Compare Fire appropriate output given the current values.
SetValue <float> Set 1st value.
SetCompareValue <float> Set compare value.
SetValueCompare <float> Set 1st value AND then Compare [sheesh, talk about confusing naming there]
OUTPUTS
OnEqualTo <float> 1st and compare values equal. Sends 1st value as parameter.
OnNotEqualTo <float> 1st and compare value NOT equal.
OnGreaterThan <float> 1st > compare value . Sends 1st as parameter.
OnLessThan <float> 1st < 2nd . Sends 1st value as parameter.
logic_lineto: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Calculates and OUTPUTS a vector from one entity to another.
[End, Start] entity source <target_destination> The two entities which are the endpoints. (Because a vector is directional, it matters which one you specify as the start and which the end.)
OUTPUTS
Line <vector> Vector changes. Passes along the vector as a parameter. [?? Isn’t this processor intensive if the two entities are often or even constantly moving??]
logic_measure_movement: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
The movement of ‘Entity to Measure’ relative to ‘Measure Reference’ is mirrored by ‘Entity to Move’ relative to ‘Movement Reference’, but with the distance/speed divided by ‘Movement Scale’. [?? What about mimicking rotation??]
[??must the value be used to move something or can it be redirected for another purpose? This eneity could use a revision of its smartedit identifiers??]
Entity to Measure MeasureTarget <target_destination> Entity whose movement you want to measure.
Measure Reference MeasureReference <target_destination> The movement of Entity to Measure will be measured relative to this entity.
Entity to Move Target <target_destination> This entity will be moved to mimic the motions of Entity to Measure.
Movement Reference TargetReference <target_destination> The Entity to Move will move relative to this entity.
Measurement Type MeasureType <choices>
CHOICE
Postion: [??]
Eye position: [??]
Movement scale TargetScale <float> divisor by which to divide the measured movements. (1: movment is equal; 2: cut in half; .5: twice as fast, etc.)
INPUTS
SetMeasureTarget <string>
SetMeasureReference <string>
Target <string> Set the ‘Entity to Move’
SetTargetReference <string>
SetTargetScale <float>
[Enable, Disable]
logic_multicompare: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Remembers each InputValue <integer> it receives until CompareValues is called and then sends the appropriate OUTPUT, OnEqual (all the same input) or OnNotEqual (at least one was different from the rest). A call of CompareValues clears the set of values to be compared for the next CompareValues.
[?? Someone check this. I’m guessing here. What would happen when CompareValues is called but no values have been input (and Should use Integer Value is ‘no’)??]
Integer Value (optional) IntegerValue <integer>
Should use Integer Value ShouldComparetoValue <Yes/No> Yes, if the value specified in IntegerValue is to be considered part of the set for every CompareValues. If no, the set of values is empty after a CompareValues call.
INPUTS
CompareValues
InputValue <integer> Add another integer for the next CompareValues.
OUTPUTS
OnEqual
OnNotEqual at least one value different from the rest
logic_navigation: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Force NPC’s to ignore an entity when navigating.
Nav Property navprop <choices>
CHOICES
NPC’s Ignore this when navigating (they’ll bump into it): very strange that there’s only one choice here; perhaps additional choices were to be added later but never were
Navigation Entity target <target_destination>
1: Start On: ON
INPUTS
TurnOff Navigation Entity’s navigation properties returned to its own control.
TurnOn Navigation Entity uses the properties specified here.
Toggle
logic_relay: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
A message forwarder. Fires an OnTrigger output when triggered, and can be disabled to prevent forwarding OUTPUTS.
Useful as an intermediary between one entity and another for turning on or off an I/O connection, or as a container for holding a set of OUTPUTS that can be triggered from multiple places.
[?? Anyone think of something useful to do with this ??]
Start Disabled…
1: Only trigger once: OFF
2: Allow fast retrigger: OFF
INPUTS
CancelPending Cancel any events fired by this relay that are currently pending in the I/O event queue.
Trigger Trigger the relay, causing its OnTrigger output to fire if it is enabled.
[Enable, Disable]
Toggle
OUTPUTS
OnTrigger Trigger INPUT fired.
logic_timer: ‘St’
// point [PI]; HL2, HL2 DM; Mr Neutron, Dec. 19, 2004
Fires a timer event at regular, or random, intervals. It can also be set to oscillate betweena high and low end, in which case it will fire alternating high/low OUTPUTS each time it fires.
Start Disabled…
Refire Interval RefireTime <string> If 'Use Random Time' isn't set, this is the time between timer fires, in seconds.
Use Random Time UseRandomTime <Yes/No>
[Maximum, Minimum] Random Interval UpperRandomBound <string> If 'Use Random Time' is set, this is the maximum time between timer fires. The time will be a random number between the minimum and maximum specified.
1: Oscillator (alternates between OnTimerHigh and OnTimerLow OUTPUTS): OFF
INPUTS
FireTimer
RefireTime <integer> Set a new Refire Interval.
[Lower, Upper]RandomBound <float> Set a new boundary for the interval.
[Enable, Disable]
Toggle
OUTPUTS
OnTimer Fired when the timer expires.
OnTimerHigh Fired every other time for an oscillating timer.
OnTimerLow Fired every other time for an oscillating timer.