The Dink Network

Quick Question

October 30th 2005, 06:38 PM
pig.gif
How to track a characteristic of a sprite as a variable? Something alng the lines of

void beaver(void)
{
int &beaverx;
sp_x(&killerbeaversupersprite, 34) = &beaverx;
&beaverx += 53;
}

that?

Thats probably wrong, but what is the exact thing, if possible?
Thanks.
October 30th 2005, 06:56 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
void beaver(void)
{
int &beaverx;
// -1 will cause it to return the current value without modifying it
&beaverx = sp_x(&killerbeaversupersprite, -1);
// Modify the value
&beaverx += 53;
// Set the value
sp_x(&killerbeaversupersprite, &beaverx);
}
October 31st 2005, 05:11 AM
pig.gif
Cool thanks, always wonderd if that was possible.