Author Topic: Custom Credits Not Working [SOLVED]  (Read 218 times)

Cogliostro

  • I know I forgot something?!
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Custom Credits Not Working [SOLVED]
« on: 16 Jun 2018, 16:41 »
Okay, I wasn't happy with any of the modules/pug-ins for credits, so I made my own.  Somewhere along the line it stopped working and I didn't notice.  Now I cannot figure out what went wrong?!

For troubleshooting purposes, I set the background of my gCredit from transparent to BLUE.  Then I installed a couple of checks, TEST A thru D to make sure that I wasn't moving the GUI on accident.

Between Tests C & D the GUI turns goes transparent/disappears/moves - I didn't know?!

So I created the ResetCredit function, and added the lines to run it.

The screen starts, the GUI background image is set, and then it all disappears between test C & D?!  Keep in mind the position of the GUI never wavers.  Also, the ResetCredit function which worked fine to initially set the background image, does nothing on any of the subsequent runs.

I REM'ed out the repeatedly_execute_always() to see if THAT was giving me grief, and nothing.  The GUI still disappears.

Went into the GUI, checked controls 0 thru 4, (they are labels), and NONE of them are locked.  The GUI covers the entire screen.

Any ideas?

 - Cogliostro.

Code: Adventure Game Studio
  1. // room script file
  2.  
  3. String RollCredits[5];
  4. short Number;
  5. int OrgPosition=500;
  6.  
  7. function room_Load()
  8. {
  9.   gBox.Visible=false;
  10.   gGear.Visible=false;
  11.   Mouse.Visible=false;
  12.  
  13.   aGreek.Play();
  14.   gCredits.Visible=true;
  15.  
  16.   Number = 1;
  17.   RollCredits[Number]=String.Format("Design, Story, Scripting, & Graphics:[Cogliostro");
  18.   Number++;
  19.   RollCredits[Number]=String.Format("AGS Game Engine:[Chris Jones");
  20.   Number++;
  21.   RollCredits[Number]=String.Format("");
  22.   Number++;
  23.   RollCredits[Number]=String.Format("Thank you for playing!");
  24.   Number++;
  25.   RollCredits[Number]=String.Format("");
  26.  
  27.   gCredits.Controls[0].X=0;
  28.   gCredits.Controls[0].Y=OrgPosition;
  29. }
  30.  
  31. function room_AfterFadeIn()
  32. {
  33.   int x=0;
  34.   while (x<Number) {
  35.     gCredits.Controls[0].AsLabel.Text=String.Format(RollCredits[x+1]);
  36.     gCredits.Controls[0].TweenPosition(0.75, 0, 200, eEaseInSineTween, eBlockTween);
  37.     Wait(10);
  38.     gCredits.Controls[0].TweenPosition(0.75, 0, -50, eEaseInSineTween, eBlockTween);
  39.     x++;
  40.     gCredits.Controls[0].Y=OrgPosition;
  41.   }
  42.   Wait(300);
  43.   RestartGame();
  44. }
  45.  


**********************************************
EDIT
**********************************************

Looks like the TWEEN module died.  Replacing with a newer version....  More troubleshooting later - It's not the tween module. 


A lot of troubleshooting has allowed me to eliminate a bunch of possible causes.  The code as it is currently represented shows the problem.  If I do anything that causes a delay in the LOOP - WHILE (lines 47-59) it causes the GUI to disappear: either a wait command or a eBlock.
« Last Edit: 16 Jun 2018, 23:40 by Cogliostro »
"First things first, but not necessarily in that order." - Dr. Who

Cogliostro

  • I know I forgot something?!
    • I can help with story design
    •  
    • I can help with voice acting
    •  
Re: Custom Credits Not Working
« Reply #1 on: 16 Jun 2018, 23:40 »
Solution = If you're working with a GUI it'll turn off during BLOCK commands or while the code is waiting?!  I set it off screen and to ALWAYS on.  Issue resolved.

 - Cogliostro
« Last Edit: 17 Jun 2018, 05:08 by Cogliostro »
"First things first, but not necessarily in that order." - Dr. Who