The Dink Network

Reply to Re: Paul Pliska's Script Trick...

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
December 27th 2007, 04:17 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
1. It works like this:

In the void main() procedure do:
int &var1 = sp_editor_num(&current_sprite);
This will return the editor number of &current_sprite. This number is not the same as &current_sprite. (I believe that usually &var1 = &current_sprite - 1)

int &var2 = editor_seq(&var1, -1);
&var2 will now be equal to the value of the editor_seq(); of &current_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.)