Posted By
Message
eyeangle
Registered 12/06/2003
Points 1683
3rd February, 2008 at 05:19:11 -
I've looked at too many array tutorials and I still can't find a simple one that explains how to save 2 counter numbers.
Upon pressing F5 save counter 1 to array + save counter 2 to array.
Upon pressing F7 load counter 1 from array + load counter 2 from array.
How do I do this? Except I have 14 different counters and 5 different save games. But I figure if I can do this first one I can do them all.
Thanks.
theonecardgame.com
viva/volt Awesome SauceRegistered 26/08/2006
Points 1694
3rd February, 2008 at 05:25:45 -
Upon pressing F5
+ Write value("Counter") to 0,0
+ Write value("Counter 2") to 1,0
Upon pressing F7
+ Set "Counter" to ValueAtXY( "Array", 0, 0)
+ Set "Counter 2" to ValueAtXY( "Array", 1, 0)
If you're using the default array anyways.
http://bfollington.tumblr.com
eyeangle
Registered 12/06/2003
Points 1683
3rd February, 2008 at 07:34:10 -
I've tried this but it doesn't work. Do I have to save the array somewhere first?
theonecardgame.com
viva/volt Awesome SauceRegistered 26/08/2006
Points 1694
3rd February, 2008 at 07:42:33 -
Make sure in properties it's set to a Number array and NOT a Text array. Also uncheck base 1 index (well it can be checked you just write to 1,1 rather than 0,0). Edited by the Author.
http://bfollington.tumblr.com
NeoMonkey Finnish Army Fire CommanderRegistered 01/12/2006
Points 243
3rd February, 2008 at 08:00:26 -
Also you have to save the array if you dont use ready one.
I have proven new mathematic formula to be true...
2D > 3D
DeadmanDines Best Article WriterRegistered 27/04/2006
Points 4758
3rd February, 2008 at 11:03:04 -
Yeah, arrays must be saved and loaded as files if you want them to be retrieved again after quitting and re-executing the game.
If you want to carry arrays over frames, set the array to global.
191 / 9999 * 7 + 191 * 7
eyeangle
Registered 12/06/2003
Points 1683
3rd February, 2008 at 22:42:52 -
How do I save the array file and load it after quitting the game?
theonecardgame.com
alastair john jack BANNEDRegistered 01/10/2004
Points 294
3rd February, 2008 at 23:18:34 -
Save it at any time you want. And just load the array at the start of frame.
lol
DaVince This fool just HAD to have a custom ratingRegistered 04/09/2004
Points 7998
4th February, 2008 at 13:41:50 -
That is...
Upon pressing F5
+ Write value("Counter") to 0,0
+ Write value("Counter 2") to 1,0
+ Save array to file
Upon pressing F7
+ Load array from file
+ Set "Counter" to ValueAtXY( "Array", 0, 0)
+ Set "Counter 2" to ValueAtXY( "Array", 1, 0)
Old member (~2004-2007).
eyeangle
Registered 12/06/2003
Points 1683
4th February, 2008 at 21:56:34 -
What I meant was how do I save the array file and load it. Not the array vales.
But I figured it out:
Apppath$+"arraysaves.arr"
Edited by the Author.
theonecardgame.com
Cecilectomy noPERegistered 19/03/2005
Points 305
5th February, 2008 at 01:50:32 -
why is it "apppath$" in clickteam products and not "./" like in reality?
n/a
viva/volt Awesome SauceRegistered 26/08/2006
Points 1694
5th February, 2008 at 02:35:16 -
.\ I do believe, and you can use it with MOST objects. ".\hello.txt" = Apppath$+"hello.txt" MOSTLY, I repeat NOT ALWAYS.
http://bfollington.tumblr.com