View previous topic :: View next topic |
Author |
Message |
Soule X

Joined: 13 Sep 2004 Posts: 131 Location: Indiana
|
Posted: Tue Oct 12, 2004 4:49 pm Post subject: Is it Possible to Store Arrays? |
|
|
Is it possible to store arrays as global variables? |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Tue Oct 12, 2004 5:47 pm Post subject: |
|
|
Kind of. That's the only way to do arrays.
Use "writeglobal(x,value)" and "readglobal(x)." _________________
|
|
Back to top |
|
 |
Guest
|
Posted: Tue Oct 12, 2004 7:15 pm Post subject: |
|
|
Ah, I see. Now that I think about it, I remember seeing that somewhere. Thank you. |
|
Back to top |
|
 |
RPGCreations E Pluribus Unum

Joined: 18 May 2003 Posts: 345
|
Posted: Wed Oct 13, 2004 12:55 pm Post subject: |
|
|
Yep, you have to fake arrays. I will be writing a tutorial for the WIKI shortly on doing this. _________________
 |
|
Back to top |
|
 |
Flamer The last guy on earth...

Joined: 04 Feb 2003 Posts: 725 Location: New Zealand (newly discovered)
|
Posted: Thu Oct 14, 2004 10:56 pm Post subject: |
|
|
I use fake arrays a lot in plotscripting lately (mainly because it's a lot easier for what I'm doing right now)
the two following are the two I use most frequently, in a for loop to manipulate 16 different NPCs to display the health, but each one displays a different number (or same, depends)
Code: | Walk NPC(
read global(HP NPCs + count)
north,1
) |
Code: | write global(
HP NPCs + count
create NPC(28,x,y)
) |
_________________ If we were a pack of dogs, IM would be a grand Hound, CN would be a very ficious little pitball, and Giz...well, it doesn't matter breed he is, he'd still be a bitch
(no offense to anyone that was mentioned) |
|
Back to top |
|
 |
|