Author Topic: My MAGS game is crashing near the end.  (Read 292 times)

DBoyWheeler

  • Maverick Hunter D-Boy at your service!
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with voice acting
    •  
My MAGS game is crashing near the end.
« on: 20 Feb 2018, 13:48 »
Okay, I've been trying to get the game to finish up... but the things that were not causing me trouble before are now the things causing me trouble.

In the past, I tried to get the player character to pick up each object before, and it worked fine in the other rooms, but now it won't.  So I tried to make it a cutscene.

Here's the code:
Code: Adventure Game Studio
  1. function room_Load()
  2. {
  3.   cParrot.Scaling = 48;
  4.   cParrot.FaceLocation(0, cParrot.y, eNoBlock);
  5.   player.FaceLocation(480, player.y, eNoBlock);
  6.   if((GotBakingSoda)&&(!UsedBakingSoda)){oBakingSoda.Visible = true;}
  7.   if((GotOldScotch)&&(!UsedOldScotch)){oOldScotch.Visible = true;}
  8.   if((GotOldFoamBeads)&&(!UsedOldFoamBeads)){oOldFoamBeads.Visible = true;}
  9.  
  10.   //Since the objects were being ornery, I had to do this.
  11.  
  12.   if(GotAllThreeItems == true)
  13.   {
  14.     player.Walk(387, 295, eBlock, eWalkableAreas);
  15.     player.FaceCharacter(cParrot, eBlock);
  16.     player.Say("Everything is here, Herr Parrot.");
  17.     cParrot.Say("All right.  Start with putting the baking soda in the crack.");
  18.     player.FaceObject(oBakingSoda, eBlock);
  19.     player.Say("Ja.");
  20.     UsedBakingSoda = true;
  21.     if(oBakingSoda.Visible == true){oBakingSoda.Visible = false;}
  22.     player.Walk(302, 256, eBlock, eWalkableAreas);
  23.     Wait(40);
  24.     player.Walk(428, 295, eBlock, eWalkableAreas);
  25.     player.FaceObject(oOldFoamBeads);
  26.     cParrot.Say("Good.  Now let's put in the Old Foam Beads so the reaction won't spill out.");
  27.     player.Say("Right.");
  28.     UsedOldFoamBeads = true;
  29.     if(oOldFoamBeads.Visible == true){oOldFoamBeads.Visible = false;}
  30.     player.Walk(302, 256, eBlock, eWalkableAreas);
  31.     Wait(40);
  32.     player.Walk(402, 295, eBlock, eWalkableAreas);
  33.     player.FaceObject(oOldScotch, eBlock);
  34.     cParrot.Say("Now to use the Old Scotch and get the reaction going.");
  35.     player.Say("Got it!");
  36.     UsedOldScotch = true;
  37.     if(oOldScotch.Visible == true){oOldScotch.Visible = false;}
  38.     player.Walk(302, 256, eBlock, eWalkableAreas);
  39.     Wait(40);
  40.     //Sound here.
  41.     SecretDoorOpen = true;
  42.     if(oSecretDoor.Visible == false){oSecretDoor.Visible = true;}
  43.     player.Say("The secret door is now open!");
  44.     cParrot.Say("We did it!");
  45.     cParrot.ChangeRoom(12, 289, 106);
  46.     player.ChangeRoom(12, 300, 344);
  47.   }
  48. }
  49.  

But after getting all three items, when I try to enter the room, the game just shows black in the window and the dang thing just freezes up!  Does AGS have a bug somewhere?

[Edit] Nevermind.  I found out what I did wrong--I had to put it in "after load".
« Last Edit: 20 Feb 2018, 13:59 by DBoyWheeler »