The Dink Network

Reply to Re: How To: High Score Saving (w/ Mayhem Implementation)

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
November 11th 2003, 12:27 PM
old.gif
isnt this just easier?

scripts:

//Just main.c
main.c
global_int("&Score", 0);
global_int("&HighScore", 0);

//start / load a game
start-*.c

//load the savedgame here, and if he starts the game, reset back the
&player_map, sp_x and sp_y settings of dink.

//The script that controls the game
Game.c

if (&score > &highscore)
{
&highscore = &score;
say("NEW RECORD!", 1);
//Save the game here (forgot the command)
} else {
say("TRY AGAIN!", 1);
}

Its allmost the same as redink1 said, but this is quite easier/faster