|
How does it work the GUI toggle? I want to be able to switch between two textures if the toggle is on or off.
(comments are locked)
|
|
The GUI.Toggle is described on this page in the manual and here in the scripting reference. If you want something to happen when toggling the toggle, here is one way to do it: Thanks..now I understand how to activate functions regarding the on/off state of the toggle
Mar 19 '10 at 12:16 PM
maveryck21
Mar 19 '10 at 12:34 PM
Lipis
@maveryck21 don't forget to upvote awesome answers.. especially the ones that helped you :)
Mar 19 '10 at 12:35 PM
Lipis
@Lipis I added == true to make the code more readable - this language construct is not obvious for people new to programming, for example. But you're right that it can be left out. About where to use curlies, that is a matter of taste.
Mar 19 '10 at 01:57 PM
runevision ♦♦
what if I only want to play a sound once using toggle button??because I tried your code and the sound keeps playing... How do I make it done once?? PROBLEM SOLVED : by adding a conditional statement before setting the boolean to true I'm able to set the toggle to play the sound only once.
Aug 02 '11 at 02:50 AM
beco13
(comments are locked)
|
