I’m trying to achieve an entity, that when other entities are in the area, are given a variable. Once these entities leave the area, the variable is toggled off. There has to be multiple of these entities. More or less, a moving ‘zone’. The entity has a model and currently runs a loop to find entities in the area, toggles the variable. The think function inside of the variable checks to see if the entity is still inside of the area, if the entity is no longer valid, and other custom variables. It will toggle the variable off if it isn’t(since it moves). The problem here is that I have to use distance checks inside of think hooks, and it just generally feels nasty. I’m curious if there’s a better way to do this. I thought about possibly setting up CollsionBounds for this (in the Entity) for when Entities Enter/Leave but I’m not sure if I can since the entities move and the collision bounds would have to constantly be updated.
Any thoughts or suggestions?