The Dink Network

Reply to Re: Resizing sprite

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:
 
 
June 4th 2016, 06:01 PM
custom_marpro.png
Marpro
Peasant He/Him bloop
 
Try this code snippet:

void main( void )
{
	
	sp_speed(¤t_sprite, 1);
	sp_base_walk(¤t_sprite, 130);
	sp_brain(¤t_sprite, 9);

	wait(100);
	increase_size();

}

void increase_size( void )
{

	//100 is default size
	int &size = 100;

    sizeLoop:
	if(&size < 300)
	{
		wait(250);
		sp_size(¤t_sprite, &size);
		&size += 10;

		goto sizeLoop;
	}

}



EDIT: cleaned up the code a bit.