That looks bloody awesome!
Good Work Pixel-Cat!!!
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menuint highscore; function repeatedly_execute () { if ((dead1==1) && (dead1==2) && (dead1==3) && (dead1==4) && (dead1==5) && (dead1==6) && (dead1==7) && (dead1==8) && (dead1==9) && (dead1==10) && (dead1==11)) { //all the aliens are dead, check No.2 at the bottom here. if (GetGlobalInt(42)>highscore) { highscore=GetGlobalInt(42); int hischandle=FileOpen ("highscore.dat", FILE_WRITE); if (hischandle==0) { Display ("The game could find a highscore."); } else { FileWriteInt (hischandle, highscore); FileClose (hischandle); } } }} function interface_click(int interface, int button) { if (interface==STATUSLINE) { if (button==7) { Display ("Highscore: %d", highscore); //displays your high score. } } }
function room_a() { // script for room: Player enters screen (after fadein) int i=1; while (i<16) { Wait (5); ChangeCharacterView (i, 2); MoveCharacter (i, Random(320), Random(200)); if (i==15) { i=1; } else { i++; } } }
//GlobalInt (42); is the score in integer form. string scorelabel;Ã, //score in string form, for displaying on GUIs. string scoredisplay; //erm, the high score for displaying...I can't really remember... /**////I don't know where to put this:////**/ int scorewrite=FileOpen ("temp.tmp", FILE_WRITE); //I don't understand this whole part (about which filename to specify, copied from manual) if (scorewrite==0) { Ã, Display("The Game could not retreive the requested file."); Ã, } else { Ã, FileWrite (scorewrite, scorelabel); //Writes string 'scorelabel' to the file Ã, FileRead (scorewrite, scoredisplay); //Read the file into a string called scoredisplay Ã, Display ("Your current high score is %s.", scoredisplay); //Displays your score. Ã, FileClose (scorewrite); //Close the file. Ã, }
Quote* ONLY post a topic for your game if the game has been STARTED, you have a clear outline of the story, and you have a screenshot available to show us.
By continuing to use this site you agree to the use of cookies. Please visit this page to see exactly how we use these.
Page created in 0.709 seconds with 19 queries.