Red/Green func-button textures -- Is this how to do it right ?

Red/Green func-button textures -- Is this how to do it right ?

Re: Red/Green func-button textures -- Is this how to do it right ? Posted by jcw on Thu Jul 29th 2010 at 4:29pm
jcw
17 posts
Posted 2010-07-29 4:29pm
jcw
member
17 posts 2 snarkmarks Registered: Jul 8th 2010
Objective: When using a button that activates a multimanager sequence, how to I get it to toggle the texture/display between a green button and a red button.

More specifically: Let's say that my func_button has a delay-before-reset of 10 seconds. So I want a green button displayed at all times EXCEPT for the 10 seconds that the button has been pushed an is waiting for the reset timer. During that 10 seconds I want a red button displayed to let the person know that the button function is not presently available.

How I am doing this now: I have two func_wall_toggle entities, one with a green button texture, and the other with the corresponding red button texture. I have the flags set opposite so that only the red button func_wall_toggle starts INVISIBLE. Then with a multimanager/multisource I include ...
redbutton 0
redbutton 10
greenbutton 0
greenbutton 10
This seems to do what I want, but with one quirk that I can't figure out. Before the func_button is pushed for the first time the green button is displayed like I want. But the first time that I activate the button the green button is STILL displayed for the 10-second reset period. (It should have toggled to the red button func_wall_toggle.) For the 2nd, 3rd, and all future button activations the red button is displayed properly for that 10-second period. It's only wrong for the first activation.

QUESTION: Is there a better way to accomplish red/green button displays with Worldcraft 3.3 and Zoner's HalfLife Tools? Can you explain why my first button activation does not work properly?

Thanks.
Re: Red/Green func-button textures -- Is this how to do it right ? Posted by tnkqwe on Fri Jul 30th 2010 at 11:41am
tnkqwe
560 posts
Posted 2010-07-30 11:41am
tnkqwe
member
560 posts 684 snarkmarks Registered: Mar 31st 2007 Occupation: High school student Location: Bulgaria
This method is long, complicated and it uses 4 entities instead of 1 in order to activate something. All you need is one func_button. The button requires 2 textures: the name of the first one starts with +a and the name of the other one starts with +0 . You can try this with the textures +0crete_swtch1a and +acrete_swtch1a.
Never think about bad things!
TNKqwe:The New Killer qwe
[img]http://images.quiz.wegame.com/production/personalities/22/badge.jpg[/img]
I am Engineer - Play Free Online Games
[img]http://media.moddb.com/images/global/moddb_88x31_v12.png[/img]
Citizen Arms
Re: Red/Green func-button textures -- Is this how to do it right ? Posted by jcw on Fri Jul 30th 2010 at 5:16pm
jcw
17 posts
Posted 2010-07-30 5:16pm
jcw
member
17 posts 2 snarkmarks Registered: Jul 8th 2010
What are the four entities?
And to which entities do I apply the two textures onto?

(If there is only one func_button, this cannot use two textures, right?)
Re: Red/Green func-button textures -- Is this how to do it right ? Posted by tnkqwe on Fri Jul 30th 2010 at 8:10pm
tnkqwe
560 posts
Posted 2010-07-30 8:10pm
tnkqwe
member
560 posts 684 snarkmarks Registered: Mar 31st 2007 Occupation: High school student Location: Bulgaria
The four entities are: func_button, 2x func_wall_toggle and multimanager. But the func_button can change it's texture when it gets used: if the button is painted in +0crete_swtch1a, after it gets used it will paint it self in +acrete_swtch1a, OR if the button is painted in +acrete_swtch1a, after it gets used it will paint it self in +0crete_swtch1a. Try it on your own.
Never think about bad things!
TNKqwe:The New Killer qwe
[img]http://images.quiz.wegame.com/production/personalities/22/badge.jpg[/img]
I am Engineer - Play Free Online Games
[img]http://media.moddb.com/images/global/moddb_88x31_v12.png[/img]
Citizen Arms
Re: Red/Green func-button textures -- Is this how to do it right ? Posted by jcw on Fri Jul 30th 2010 at 9:52pm
jcw
17 posts
Posted 2010-07-30 9:52pm
jcw
member
17 posts 2 snarkmarks Registered: Jul 8th 2010
What are you using the two func-wall_toggle entities for?

I thought they would be needed to toggle the view between the two textures, but if the func_button does this already, why are func_wall_toggles needed?

Thanks.
Re: Red/Green func-button textures -- Is this how to do it right ? Posted by tnkqwe on Sat Jul 31st 2010 at 9:20am
tnkqwe
560 posts
Posted 2010-07-31 9:20am
tnkqwe
member
560 posts 684 snarkmarks Registered: Mar 31st 2007 Occupation: High school student Location: Bulgaria
jcw said:
More specifically: Let's say that my func_button has a delay-before-reset of 10 seconds. So I want a green button displayed at all times EXCEPT for the 10 seconds that the button has been pushed an is waiting for the reset timer. During that 10 seconds I want a red button displayed to let the person know that the button function is not presently available.

How I am doing this now: I have two func_wall_toggle entities, one with a green button texture, and the other with the corresponding red button texture. I have the flags set opposite so that only the red button func_wall_toggle starts INVISIBLE. Then with a multimanager/multisource I include ...
redbutton 0
redbutton 10
greenbutton 0
greenbutton 10
I was talking about the method you explained. In it you are using two func_wall_toggle entities.
Never think about bad things!
TNKqwe:The New Killer qwe
[img]http://images.quiz.wegame.com/production/personalities/22/badge.jpg[/img]
I am Engineer - Play Free Online Games
[img]http://media.moddb.com/images/global/moddb_88x31_v12.png[/img]
Citizen Arms
Re: Red/Green func-button textures -- Is this how to do it right ? Posted by jcw on Tue Aug 3rd 2010 at 12:19am
jcw
17 posts
Posted 2010-08-03 12:19am
jcw
member
17 posts 2 snarkmarks Registered: Jul 8th 2010
Thanks tnkqwe.

Like you said, I was using 4 entities instead of one. (I'm relatively inexperienced as a mapper, as you've probably figured out.)