The Dink Network

Reply to Re: sp_custom

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:
 
 
February 26th 2008, 05:37 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
There is an upper bound to editor_frame and editor_seq values, and this is lower than the upper bound of "normal" variables.

Also, your code doesn't work. editor_frame and editor_seq (and editor_type too) need an "editor sprite number", not an "active sprite number". Fixed:

//example
int &crap = sp_x(&current_sprite, -1);
&crap *= 1000;
int &crap2 = sp_y(&current_sprite, -1);
&crap += &crap2;
int &me = sp_editor_num(&current_sprite);
editor_frame(&me, &crap);

//main procedure
//extracting the x,y
int &me = sp_editor_num(&current_sprite);
int &crap = editor_frame(&me, -1);
int &crap2 = &crap;
&crap /= 1000;
sp_x(&current_sprite, &crap);
&crap *= 1000;
&crap2 -= &crap;
sp_y(&current_sprite, &crap2);

//end of scripting