The Dink Network

Reply to Re: Picking stuff up so it never comes back

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:
 
 
October 3rd 2010, 12:57 PM
boncag.gif
JugglingDink
Peasant He/Him United Kingdom
Streetfish 
Carrying on from my earlier question (This is kinda in the same vein), could anyone tell me what's wrong with this piece of code? It's taken from void hit(void) and takes place just after a conversation, and this time the code is so dink can destroy a piece of a wall:

fade_down();
wait(500);
sp_nodraw(&current_sprite, 1);
playsound(9, 22050, 0, 1, 0);
wait(500);
playsound(9, 22050, 0, 1, 0);
wait(200);
playsound(9, 22050, 0, 1, 0);
wait(500);
playsound(9, 22050, 0, 1, 0);
wait(100);
playsound(12, 22050, 0, &current_sprite, 0);
script_attach(1000);
int &hold = sp_editor_num(&current_sprite);
if (&hold != 0)
{
editor_type(&hold, 1);
}

sp_hard(&current_sprite, 1);
draw_hard_map();
sp_kill(&current_sprite, 1);
int &dust;
&dust = create_sprite(347, 093, 0, 80, 23);
sp_nohit(&dust, 1);
sp_nodraw(&dust, 0);
wait(500);
fade_up();
unfreeze(1);
kill_this_task();
}


The code itself seems to work (the wall vanishes and is replaced with dust) however the hardness remains behind. I must of walked through that cave 20 times testing different bits of code by now

Bananas and stolen cookies to anyone that helps

Edit: Oh, and in case I didn't make it clear, the wall is hard, gets destroyed and leaves the dust sprite behind. The dust should not be hard. As far as I can tell it's the wall's hardness being left behind rather than the dust's hardness