The Dink Network

bomb overload glitch

January 16th 2005, 09:57 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I was working on weapon scripts (making items like bombs elixers and axes stackable) and I came across this one glitch that screws the game up really badly. When i lay lots of bombs in a short period of time the game starts to glitch, and if I lay 30+ bombs right after another when I stop, and then try to lay them again, they don't appear. I also noticed that I couldn't shoot arrows or throw axes either. I think i need to add a delay so you can't lay them one right after another but i'm not quite sure how to do it. And also I noticed if you lay a couple bombs and then go into a house, some of the sprites in the room go crazy (like the walls; i think they run their sequence) and then disappear. If anybody can help with either problem plz reply.

-Heres the script:

//item bomb

void use( void )
{
if (&bombs > 0)
{

&bombs -= 1;
spawn("dam-bom");

if (&bombs > 0)
{
say_stop("I have &bombs bombs left", 1);
}

if (&bombs == 0)
{
say_stop("That was my last one!", 1);
kill_cur_item();
kill_this_task();
}

}

if (&bombs == 0)
{
kill_cur_item();
kill_this_task();
}

}

void disarm(void)
{
debug("bomb disarmed.");

kill_this_task();
}

void arm(void)
{

preload_seq(420);
preload_seq(161);
preload_seq(166);

init("load_sequence_now graphics\dink\walk\ds-w1- 71 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w2- 72 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w3- 73 43 38 72 -14 -9 14 9");
init("load_sequence_now graphics\dink\walk\ds-w4- 74 43 38 72 -12 -9 12 9");

init("load_sequence_now graphics\dink\walk\ds-w6- 76 43 38 72 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w7- 77 43 38 72 -12 -10 12 10");
init("load_sequence_now graphics\dink\walk\ds-w8- 78 43 37 69 -13 -9 13 9");
init("load_sequence_now graphics\dink\walk\ds-w9- 79 43 38 72 -14 -9 14 9");

init("load_sequence_now graphics\dink\idle\ds-i2- 12 250 33 70 -12 -9 12 9");
init("load_sequence_now graphics\dink\idle\ds-i4- 14 250 30 71 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i6- 16 250 36 70 -11 -9 11 9");
init("load_sequence_now graphics\dink\idle\ds-i8- 18 250 32 68 -12 -9 12 9");

if (&bombs > 0)
{
say_stop("I have &bombs bombs at my disposal", 1);
}

if (&bombs == 0)
{
say_stop("I don't have any bombs left!", 1);
kill_cur_item();
kill_this_task();
}
}

void pickup(void)
{
kill_this_task();
}

void drop(void)
{
debug("bomb removed");
draw_status();
kill_this_task();
}
January 17th 2005, 09:24 AM
spike.gif
These things happen. The kind of bugs you can't really fix... Perhaps if you posted your script we could try to help??