|
Hello, I have written a function and in my Project's GUI i got buttons with the names : Pause, Play, Rewind. It's all good until now, but when i capsule the buttons into each other (first play gets pressed, then rewind, pause, play etc) It starts my function Multiple times and this isn't what i'm looking for. Linking the functions OnGUI() and Dashboard()
(comments are locked)
|
|
It's starting Dashboard multiple times, because that's what your code tells it to do (eg. whenever you toggle Pause). Start it once, then control it through the variables, otherwise you're just going to get into a big mess. oh i forgot to update the script. 1 sec
Jul 12 '11 at 01:43 PM
biohazard
@Warwick Allison script updated
Jul 12 '11 at 01:45 PM
biohazard
I think you need to restructure that code to have a single loop. For example, how are you going to pause or play while rewinding?
Jul 12 '11 at 02:10 PM
Waz
that exactly is the problem i keep running into
Jul 12 '11 at 02:11 PM
biohazard
So learn, and stop contradicting. "Formatting doesn't matter at all" is about the most ignorant comment I've ever seen on this site.
Jul 12 '11 at 03:00 PM
Waz
(comments are locked)
|

The German variable names I can manage, but your formatting makes it unreadable regardless. Please fix.
Formatting doesn't matter at all...
It does to people who you want to read that mess. We aren't compilers.
short from of the code : i'm reading a file with racing values like velocity and engine rotation and rotating a dashboard's needles with them. now i want play, pause and rewind buttons.