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.
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
- If the target is dead by time of launch, the missiles appear to head towards the ground.
- If the target dies while the missiles are in-flight they appear to loop around the target. This will need to be fixed programmatically. Probably with a proximity detection to explode when in range of target.