How would i make a brush based entity do something when the player is inside it?

hello, i am making the minigames for my lobby i am making and i need to make some brish based entitys that will do something while the player is inside it if you get what i mean? also , how would i make it invisible and make it so the player can go through it as if it wasnt there?

I think you need to make a brush covered with the “trigger” texture.

In LUA you would create a lua/entities/<name of your ent>/shared.lua with the following code on top of it :


ENT.Type = "brush"

And use


function ENT:StartTouch(entity)

to make something when the player start touching it.

I’m not a lua coder so I can’t help that much.

ok, and entity being player?

Entity:SetNotSolid and Entity:SetColor

entity:IsPlayer() to see if it’s a player