using a door as a button Created 8 months ago2017-12-04 21:14:23 UTC by twitch1 twitch1

Created 8 months ago2017-12-04 21:14:23 UTC by twitch1 twitch1

Posted 8 months ago2017-12-04 21:14:23 UTC Post #338309
I was looking for an option to make my func_buttons (used mainly for doors) to be passable and couldn't find a way to make that happen while still utilizing textures of my choice. So... I tried out a func_door as a button, enabled the "passable" flag, and set the lip to +1 so the func_door (button) didn't move. It is 1 grid point in width.

The only issue I saw was that animated textures didn't work on a func_door. This means my func_door (used as a button) won't appear on/off /enabled/disabled like normal buttons do when they have a +0_ texture applied that has a +A_ with the same name.

Is there a way to make a func_door switch texture when clicked, like func_buttons?
Posted 8 months ago2017-12-04 22:39:34 UTC Post #338310
Perhaps try targetting a passable func_wall with the wanted texture which covers the same place than your func_door?

Edit: Try targetting on close if that suits you otherwise you'll have to create a buffer as the target is triggered both on open and on close. The buffer would be a multi_manager that triggers your action, but also disable itself for let's say 2 seconds. Within that 2 seconds the second targetting will occur and does nothing. You'll have to create changetarget entities to both enable / disable the target of your door (which switches the target between nothing and your multi_manager).

Edit2: There's no such thing as a passable func_wall and I guess func_illusionary doesn't switch texture. I'll make some tests tonight.
The reason why the animated texture doesn't show, might be because both on open and on close is targetted. So basically, the texture might turn on, but only a fraction of time.

If my theory is right, you might want to set the toggle flag of your func_door and automatically trigger the close with a delay long enough so the animated texture can show.
olograph olographTWHL's Personal Donald Trump
Posted 8 months ago2017-12-05 00:12:41 UTC Post #338311
Try adding "zhlt_noclip 1" keyvalue to your func_button. This will make it passable with an excuse that the button will still block bullets and projectiles.
This works with any kind of brush-based entities.
Posted 8 months ago2017-12-05 01:54:13 UTC Post #338312
Try adding "zhlt_noclip 1" keyvalue to your func_button. This will make it passable with an excuse that the button will still block bullets and projectiles.
This works with any kind of brush-based entities.
Boom! Works like a charm! Love it. Would love it even more if it didn't have projectile and tripmine collisions
Posted 8 months ago2017-12-05 03:29:25 UTC Post #338313
"Try adding "zhlt_noclip 1" keyvalue to your func_button." +1

Something else to add to my toolkit!
olograph olographTWHL's Personal Donald Trump
You must be logged in to post a response.