The Dink Network

Reply to Re: Reviving a 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:
 
 
March 15th 2010, 12:33 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
I'll provide the full code, although I have tried just stripping it all down to the core which is refilling its HP and that doesn't work either as I said.

  // Revive once if upgrade available
  int &stat;
  if (sp_custom("revived", &current_sprite, -1) == 0)
  {
	if (&dgupgrade >= 8)
	{
		sp_custom("revived", &current_sprite, 1)
		external("helper", "sparkles", &current_sprite);
		playsound(22, 22050, 0, 0, 0);
		if (&dgupgrade == 0)
		{
			&stat = &lifemax;
			&stat / 4;
		}
		if (&dgupgrade >= 1)
		{
			&stat = &lifemax;
			&stat / 3;
  		}
		if (&dgupgrade >= 5)
		{
			&stat = &lifemax;
			&stat / 2;
  		}
		sp_hitpoints(&current_sprite, &stat);
		goto loop;
	}
  }


The loop is found in the main() procedure.