Reply to Re: Data type hacks...
If you don't have an account, just leave the password field blank.
I meant that you can use editor_seq with the sprite number as array index and sequence as value, so you can do something like this
You can retrieve values by editor_seq(&index, -1), like this:
edit: fixed the &value increment
edit2: forgot that editor sprite numbers start from 1
edit3: added the value readback script
//Switch to screen holding the array
int &old_map = &player_map;
&player_map = 123;
//Store 10 numbers to an array
int &index = 1;
int &value = 1;
loop:
&value *= 2;
editor_seq(&index, &value);
&index += 1;
if(&index < 11)
{
goto loop;
}
&player_map = &old_map;
//Now we effectively have an array of [2, 4, 8, 16, 32, 64, 128, 256, 512, 1024]
You can retrieve values by editor_seq(&index, -1), like this:
freeze(1);
int &old_map = &player_map;
&player_map = 123;
int &index = 1;
int &value;
loop:
&value = editor_seq(&index, -1);
say_stop("The value at index &index is &value", 1);
&index += 1;
if(&index < 11)
{
goto loop;
}
&player_map = &old_map;
unfreeze(1);
edit: fixed the &value increment
edit2: forgot that editor sprite numbers start from 1
edit3: added the value readback script






