Quantcast
Channel: Questions in topic: "playerprefs"
Viewing all articles
Browse latest Browse all 1333

Game doesn't move to next scene on Ouya

$
0
0
Hello everyone, Well, after months of developing my game, hundreds of hours of playtesting, coding, bugtesting, fixing, and then porting to Android I thought I'd still have some hurdles, but not the kinds I'm having. Welcome to coding, I suppose. I'm trying to develop for the Ouya, and am having a strange issue. My game goes Splash Screen - Main Menu - (if select new game) - Are you sure screen - (If Yes) Intro. Now, when going from Are You Sure to Intro a command is inserted to delete PlayerPrefs and install new ones. (script below) In Windows, everything works fine. On the Ouya, however, when the player selects new the music for the intro begins, but the scene never changes, and after the intro would have ended (estimated guess based on the music's playthrough) the entire thing crashes. Now, am prepared to deal with it crashing when the gamescene starts, but the intro scene makes no sense, as it's just slides and music. I don't know if it's the Playerprefs commands that have something to do with it, or the limits of the Ouya itself. Any help is greatly appreciated. Thanks, and God bless. **EDIT:** Ok, well I've been able to locate WHAT is giving the Ouya nightmares, but not WHY. After playing around with what scenes the player was sent to I determined that the PlayerPrefs commands were not the problem. Instead, my introslidechanger script is the culprit. I figured this out by sending to a different scene without it, with no issue. I then sent the player to another scene that held (and only held) a functionally identical script, and the same exact thing happened. It's not Playerprefs. Those are fine. It's the intro slide changer. Just not sure WHY. So here's what I've got: The player goes into the scene and there's supposed to be a background. After a few seconds, the camera fades out, the background is replaced with another background, the camera fades back , rinse, repeat. Somewhere in there the Ouya isn't liking something. **Intro Slide Changer, just in case it might be that** var BG1 : GameObject; var BG2 : GameObject; var BG3 : GameObject; var BG4 : GameObject; var BG5 : GameObject; var BG6 : GameObject; var BG7 : GameObject; var BG8 : GameObject; var BG9 : GameObject; var BG10 : GameObject; var BG11 : GameObject; var BG12 : GameObject; var BG13 : GameObject; var BG14 : GameObject; var BG15 : GameObject; var BG16 : GameObject; var Cam1 : Camera; function Start () { yield WaitForSeconds(8.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG1.active = false; BG2.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG2.active = false; BG3.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG3.active = false; BG4.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG4.active = false; BG5.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG5.active = false; BG6.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG6.active = false; BG7.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG7.active = false; BG8.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG8.active = false; BG9.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG9.active = false; BG10.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG10.active = false; BG11.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG11.active = false; BG12.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG12.active = false; BG13.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(20.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG13.active = false; BG14.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG14.active = false; BG15.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); BG15.active = false; BG16.active = true; Cam1.SendMessage("fadeIn"); yield WaitForSeconds(12.0); Cam1.SendMessage("fadeOut"); yield WaitForSeconds(3.0); Application.LoadLevel(6); } function Update () { if(Input.GetButtonUp("Action")) Application.LoadLevel(6); { } }

Viewing all articles
Browse latest Browse all 1333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>