Making the HHH only spawn once?

Chaos

L1: Registered
Mar 31, 2022
36
1
So I have a Halloween map I want to get back to making, and I wanna put everyone's favorite pumpkin headed, axe-wielding maniac. I have it set up where he spawn in after a random amount of time. Only problem is, if enough time goes by another one might spawn. How can I make it so only one can be active at a time?
Is it possible?
 

Box Of Paper

L3: Member
Jul 15, 2019
112
143
To have only one HHH at a time you'd need to detect its death...

You can detect HHH's death with a trigger_multiple, but you'd have to make it map wide (I've tried attaching the trigger with a logic_measure_movement but it doesn't work well enough, and parenting would kill the trigger before it could fire it's outputs).

If the map wide trigger is ok then make sure to update the trigger_multiple's flags and tick "Everything", and set it's filter to a "filter_activator_class" with "headless_hatman" as the class, then you can use OnEndTouch to fire outputs when HHH dies.

OR...

There's a solution that doesn't detect the death immediately (and fires triggers every few seconds) but is much more clean on the map, I've attached this solution down here.

Basically when HHH spawns a logic_relay will try to re-enable the logic_relay that spawns HHH, but before that it will notify HHH (with FireUser1) which will stop that from happening (CancelPending) and tell the logic_relay to try again in 5 seconds. Thus if the HHH is dead it will result in the re-enabling of the spawner logic_relay.
 

Attachments

  • only_one_hhh_2ndVer.vmf
    31.4 KB · Views: 79
Last edited:

Chaos

L1: Registered
Mar 31, 2022
36
1
I'll test these out. Thanks! If anything happens I'll let you know.