button states Created 1 month ago2020-09-09 09:59:52 UTC by freedslave freedslave

Created 1 month ago2020-09-09 09:59:52 UTC by freedslave freedslave

Posted 1 month ago2020-09-09 09:59:52 UTC Post #344708
Hi,
I made a brush tied to a target_button entities.
The top texture is flatbed_lite2
It's not a native animated texture so I need to change it to flatbed_lite1 when the button is pressed, making a 2 states button.
It easy but I don't know how to do it. So easy, actually, that it must have been settled in a former thread since long but I didn't find one.
Here I am repeating errors from the past.
Thanks
Posted 1 month ago2020-09-09 18:00:16 UTC Post #344713
Since it's not using a switchable texture, you will need to use func_wall_toggles.
  • Create your two brushes, one textured with flatbed_lite1 and the other with flatbed_light2.
  • Turn them both into func_wall_toggles.
  • Give them the same name.
  • On one of them, check the "Starts Invisible" flag.
  • Now create a button or trigger that targets the func_wall_toggles.
  • Voila!
UrbaNebula UrbaNebulaGoldSourcerer
Posted 1 month ago2020-09-10 09:41:24 UTC Post #344714
Sorry I didn't manage to implement your tutorial into my context.
Actually I have never used the func_wall_toggle enity. I need to practice it with maybe another tutorial.
For my sake I used +0BUTTON2 which switches to another texture (+ABUTTON2) when the button is pressed.
BUT that makes a basic On/Off switching. I search how to have a temporary switching.
1) texure off
2) texture on for ~50ms then revert to texture off automatically

That's ok.
I used +0BUTTON2 and a func_button entity with the flag Don't move and a Lip parameter to set the time
Thanks
You must be logged in to post a response.