I have this GUI texture that changes depending on how many times the jump button i pressed during midair, but when I respawn the function does not work again. It it does not reset, and it stays on the last GUItexture image from the previous jump.
I trigger it though my character controller script in the jump function here (post onlye the jumping part of the script):
The third last line "SplashScript.SPLASH -= 1:" is where i trigger it through my character controller script.
asked Aug 03, 2010 at 09:22 AM
In your script, you constantly subtract -1 from SplashScript.SPLASH, but never reset it. You probably want to reset it to 6 in the "if(grounded)" case. Also note that your SplashScript does nothing for that default value - you probably want to add a "case 6", which resets to the inital texture.
answered Aug 03, 2010 at 11:31 AM