Reply to Re: Paul Pliska's Script Trick...
If you don't have an account, just leave the password field blank.
1. It works like this:
In the void main() procedure do:
int &var1 = sp_editor_num(¤t_sprite);
This will return the editor number of ¤t_sprite. This number is not the same as ¤t_sprite. (I believe that usually &var1 = ¤t_sprite - 1)
int &var2 = editor_seq(&var1, -1);
&var2 will now be equal to the value of the editor_seq(); of ¤t_sprite.
Then, wherever you wish to store something in the editor_seq:
&var2 = <newvalue>;
And then to store it:
editor_seq(&var1, &var2);
You can use both editor_seq and editor_frame for this. editor_frame will be a number between 0 and 255, editor_seq has a larger range. I believe it has to be positive though...
2. Well, a little test confirms that if (&var) does the same as if (&var != 0). (negative values will return true as well.)
In the void main() procedure do:
int &var1 = sp_editor_num(¤t_sprite);
This will return the editor number of ¤t_sprite. This number is not the same as ¤t_sprite. (I believe that usually &var1 = ¤t_sprite - 1)
int &var2 = editor_seq(&var1, -1);
&var2 will now be equal to the value of the editor_seq(); of ¤t_sprite.
Then, wherever you wish to store something in the editor_seq:
&var2 = <newvalue>;
And then to store it:
editor_seq(&var1, &var2);
You can use both editor_seq and editor_frame for this. editor_frame will be a number between 0 and 255, editor_seq has a larger range. I believe it has to be positive though...
2. Well, a little test confirms that if (&var) does the same as if (&var != 0). (negative values will return true as well.)