The Daily Click ::. Forums ::. Klik Coding Help ::. Simpleness array please question. What?
 

Post Reply  Post Oekaki 
 

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 Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
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.

 
Image
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 Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
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).

Image Edited by the Author.

 
Image
http://bfollington.tumblr.com

NeoMonkey

Finnish Army Fire Commander

Registered
  01/12/2006
Points
  243

VIP Member360 OwnerI am an April FoolPS3 Owner
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

Image


DeadmanDines

Best Article Writer

Registered
  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

BANNED

Registered
  01/10/2004
Points
  294

GOTW WINNER CUP 1!GOTW WINNER CUP 2!GOTW WINNER CUP 3!VIP MemberMushroomI am an April Fool
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 rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
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"



Image Edited by the Author.

 
theonecardgame.com

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
5th February, 2008 at 01:50:32 -

why is it "apppath$" in clickteam products and not "./" like in reality?

 
n/a

viva/volt

Awesome Sauce

Registered
  26/08/2006
Points
  1694

Game of the Week WinnerSilverNova MemberKlikCast StarVIP Member
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.

 
Image
http://bfollington.tumblr.com
   

Post Reply



 



Advertisement

Worth A Click