How do I listen to an event on an object that hasn't been created yet?

What you’re not doing is having your weapon decide who is currently affected, at the time of triggering.
The NPCs may need to know what it means to be “frozen” (e g, implement an OnFreeze() function interface) but they don’t need to know anything about the freeze gun.
Think of it this way: Maybe other things will cause freeze too? Freeze grenade? Freeze trap? Freeze zone?
It shouldn’t be that every object needs to know about every thing that can cause a particular status. There needs to be some “meet in the middle” that de-couples the “causer” and the “causee” so they don’t know directly about each other.

3 Likes