Blocking off map areas in lua?

Is there a way to spawn some sort of invisible wall or blocks on map load to block off areas?

Or if not, some sort of way to find out if a player enters a particular area?

There is a way to do both of these things.

There are also addons for this.

No guys, please, don’t mention any names or give me anything to go on, I’m a pretty good psychic.

You could create your own type of trigger entity which uses Entity.PhysicsInitBox to create the collision boundaries. Then when a player activates the ENT.StartTouch hook, you can teleport them, kill them, etc.

[editline]19th March 2014[/editline]

I believe the collision group that you’ll want to use is COLLISION_GROUP_DEBRIS_TRIGGER, but I’m not sure.

Thanks, I’ll take a look in to this and see what I can come up with.

If this can make a solid invisible wall, that’s pretty much all I needed :slight_smile:

It’s more like a brush without collision (much like a trigger), but you can handle what to do with entities that activate touch events.

Alright, it’ll be a little more complex than required but I’ll probably have to do events rather than just blocking off an area I guess :o