|
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.
(comments are locked)
|
|
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. I don't even know what comands resets a function. :S Am still REALLY wet behind the ears when it comes to scripting.
Aug 03 '10 at 12:02 PM
remvan3d
Note that with your method (since you start with 6 and subtract when jumping) trick6 is the texture shown after 1 jump, trick5 after 2 jumps, etc.
Aug 04 '10 at 04:11 PM
Wolfram
(comments are locked)
|
