Page 2 of 2

PostPosted: Mon Feb 23, 2004 5:38 pm
by makslane
Your global code is ok, so:

On Create Actor, put:

lives = 0;
loadLives();
test.textNumber = lives;

On Key Down (c):

lives++;
test.textNumber = lives;

On Key Down (x):

saveLives();
ExitGame();

PostPosted: Mon Feb 23, 2004 5:54 pm
by ingsan
:lol: Wow IT'S WORKING IT'S WORKING ! i'm so happy and so thankful to YOU :P :P :P

GE's GREAT

PostPosted: Sat Apr 24, 2004 10:18 am
by ingsan
Hello everyone !
Yeah it's me again asking questions about saving game ... sorry :D

I followed makslane's advice concerning saving and loading vars and it works wonderfully (It's so awesome :shock: !)
This time I am wondering if that could be used to save Timers' time too. For ex I have a timer of 9000 ms on runtime but I quit when timer has only reached 5000 ms. Is there a possibility, when loading the saved game, to get back the timer where we have left it ie 5000 ms ?

Any idea ? :?

PostPosted: Sat Apr 24, 2004 6:24 pm
by makslane
You can save a var with remain time and use it to create a new timer with this value in the Script Editor:

CreateTimer("Event Actor", "your timer", savedValue);

PostPosted: Sat Apr 24, 2004 6:33 pm
by ingsan
So savedValue = variable for ActualTime in ms when game is saved. How can I declare that savedValue = ActualTime. Where can i point this ?

PostPosted: Sat Apr 24, 2004 6:52 pm
by makslane
Use a gloval var,
On some Create Actor, init the var:
savedValue = 9000;

and make your changes...

PostPosted: Sat Apr 24, 2004 7:25 pm
by ingsan
:oops: got it