Talk:Npc launcher: Difference between revisions
Ninjaofsauce (talk | contribs) No edit summary |
Ninjaofsauce (talk | contribs) No edit summary |
||
Line 3: | Line 3: | ||
== Targeting a target == | == Targeting a target == | ||
Using a trigger_multiple, logic_relay, and npc_launcher together | Using a trigger_multiple, logic_relay, and npc_launcher together. Make the [[trigger_multiple]] activate the [[logic_relay]]. Then we set the ''targetname'' of the ''!activator'' (of the trigger). The [[npc_launcher]] turns on, updates, fires. After the missile fires, we clear the target's targetname, forget it existed and turn off. I am not certain if the ''UpdateEnemyMemory''/''ForgetEntity'' is needed. Further testing is required. | ||
'''logic_relay''' | |||
OnTrigger !activator AddOutput targetname missile_target | OnTrigger !activator AddOutput targetname missile_target | ||
OnTrigger <npc_launcher> SetEnemy missile_target | OnTrigger <npc_launcher> SetEnemy missile_target | ||
OnTrigger <npc_launcher> TurnOn | OnTrigger <npc_launcher> TurnOn | ||
OnTrigger <npc_launcher> UpdateEnemyMemory | OnTrigger <npc_launcher> UpdateEnemyMemory | ||
OnTrigger <npc_launcher> FireOnce | |||
OnTrigger missile_target AddOutput targetname (make it a space or blank) | |||
OnTrigger <npc_launcher> ForgetEntity | |||
OnTrigger <npc_launcher> TurnOff |
Revision as of 09:58, 29 December 2019
This entity seems to be used in Half-Life 2, in d1_eli_02. Can anyone else check other games? --RandomCatDude (talk) 19:35, 1 December 2018 (UTC)
Targeting a target
Using a trigger_multiple, logic_relay, and npc_launcher together. Make the trigger_multiple activate the logic_relay. Then we set the targetname of the !activator (of the trigger). The npc_launcher turns on, updates, fires. After the missile fires, we clear the target's targetname, forget it existed and turn off. I am not certain if the UpdateEnemyMemory/ForgetEntity is needed. Further testing is required.
logic_relay
OnTrigger !activator AddOutput targetname missile_target
OnTrigger <npc_launcher> SetEnemy missile_target
OnTrigger <npc_launcher> TurnOn
OnTrigger <npc_launcher> UpdateEnemyMemory
OnTrigger <npc_launcher> FireOnce
OnTrigger missile_target AddOutput targetname (make it a space or blank)
OnTrigger <npc_launcher> ForgetEntity
OnTrigger <npc_launcher> TurnOff