The Dink Network

KM2 script problem

April 2nd 2006, 01:25 PM
goblins.gif
Neo
Peasant He/Him Poland
He Who Would Steal The Flame Must Die 
I am working on Kill Murdoock! 2, but I've ecountered a stupid bug just after I began to work.

void main( void )
{
sp_nodraw(&current_sprite, 1);
sp_touch_damage(&current_sprite, -1);

}

void touch ( void )
{
sp_touch_damage(&current_sprite, 0);
freeze(1);
playsound(24, 22052, 0, 0, 0);
&bum = create_sprite(212, 373, 7, 167, 1);
sp_seq(&bum, 167);
wait(200);
&en = create_sprite(213, 373, 0, 349, 1);
freeze(&en);
wait(1000);
unfreeze(1);
}

This is a script attached to an obstacle, which should be invisible; when Dink touches it, it should spawn an explosion and an enemy in it. But in the reality ( ), when Dink touches it, I can HEAR an explosion... but nothing is drawn. Why?
April 2nd 2006, 01:47 PM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
Are &bum and &en globals? If not than you should write
int &bum = create_sprite(212, 373, 7, 167, 1);
instead of just:
&bum = create_sprite(212, 373, 7, 167, 1);

And
int &en = create_sprite(213, 373, 0, 349, 1);
instead of
&en = create_sprite(213, 373, 0, 349, 1);
April 2nd 2006, 01:48 PM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
Try declaring the variables, like

int &bum = create_sprite(212, 373, 7, 167, 1);
April 2nd 2006, 01:49 PM
goblins.gif
Neo
Peasant He/Him Poland
He Who Would Steal The Flame Must Die 
OMG. I love you.

/In addition, I'm going to hang myself for stupidity. Will anyone take my work then? /