The Dink Network

Reply to Removing hardness forever

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:
 
 
July 25th 2010, 12:24 PM
wizardb.gif
Kyle
Peasant He/Him Belgium
 
I have a snippet of code I use in a helper script that I can call from wherever I like to delete a sprite from the game forever. Problem is, it doesn't work. The sprite does not lose hardness nor does it disappear forever.

void killforever (void)
{
  // Remove a sprite from the game forever so it no longer shows up on screenswap
  // Arg1 is the sprite

  sp_hard(&arg1, 1);
  draw_hard_sprite(&arg1);
  int &hold = sp_editor_num(&arg1);
  if (&hold != 0)
  {
  	editor_type(&hold, 1); 
  }
}  


I do the following to remove an invisible barrier after using an item:
sp_nodraw(&actor1, 0);
&substory = 4;
say("There we go, hope it holds.", 1);
kill_cur_item();
draw_status();
external("helper", "killforever", &actor2);
sp_kill(&actor2, 1);


&actor2 = &current_sprite is set for the barrier sprite.