- Home /
Other
Infinite runner stop everything when player dies?
Hi,
I have been trying to figure this out for a while and can't seem to find anything on it.
I have a character that is basically running in place while platforms move through the visible screen. When the player dies I want all my animations to keep playing but I don't want the platforms(which are prefabs) to keep moving through the screen and under my player while the dying animation is playing. I also want my GUI to keep working too, so i figured i can't use timescale unless i can make certain things exempt from it.
I wan to avoid "GetComponent" in update which is what i have and it works right now but is probably heavy on performance. I am using "GetComponent" in update to check to see if my player has died form the script on my player. I have a the movement script on my platforms that just move the object to the left when it is pulled form the object pool.
Is it possible to make certain elements exempt from Timescale or is there another way to do this?
Answer by iKatsuX3 · Feb 24, 2014 at 09:39 AM
I am nor expert but a simple programmer just like you. We require all kinds of help, So here is my opinion about your question...
Try learning GUI's or so called "User Interface" most gamers only see it as Pause,Resume,Exit buttons. Try combining Pause with a text saying "You Failed" or "You Died" that stops the scripts of the prefabs of the obstacles but not the background.
Oh, Forgot.. Here's a tip.. Maybe you already know about it. But, DON'T make the background and obstacles into one! Differentiate their scripts and make sure they have different scripting cause having the same scripts all over again would make lags more frequent. Don't ask for scripts from me... I'm just a simple game maker! :3
iKatsuX3