Bhop Map Freeze

I’m making a BunnyHop gamemode and I was curious as to how would I make the func_door freeze so that the blocks don’t go down when you touch them?

Not sure what to call for a methed for a func_door freeze.

Please help if you can!

Thank You

In the flags menu I believe there’s an option that by default is checked called “Open on Touch” uncheck that.

This is assuming you know where the flags menu is in hammer.

Not sure about lua doing that since it’s a boolean and not a specific value. You’d probably have to create a custom property in hammer for that door which directly modified the Open on Touch and then set that created property to false/true in lua.

I know how to do this through the debug command “ent_fire”.

ent_fire entitynamehere addoutput “spawnflags 0”

I just don’t know how to convert it to Lua.

[lua]
function GM:InitPostEntity( )

local doors  = ents.FindByClass("func_door")
for k,v in pairs(doors) do
	v:Fire("lock", "", 0)
	v:SetKeyValue("locked_sound","")
	v:SetKeyValue("unlocked_sound","")
end

end
[/lua]

Worked for me.

You could probably do it in one line if you figure out how to turn what I did into Lua. I know there has to be a way to do ent_fire debugging in Lua.

Entity:GetSaveTable().m_bIsLocked

Why rate me dumb? I’m being serious - if you set it so doors don’t open on touch via spawnflags they won’t unless they’re using something stupid like triggers to keep the doors open. Setting the spawnflags to 0 turns all of the spawnflags (including the open on touch spawnflag) off. It is another solution that I think gets the job done much faster and easier than setting every single value on the door.