The Dink Network

bomb bug still here

August 20th 2006, 07:00 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
I seems that the bug I talked about forever and ever ago still exists in v1.08. Basically, I laid a bomb and switched screens a couple times and a random sprite from the screen is set off like a bomb. I talked about this before here when v1.07 was the latest version.
August 20th 2006, 07:08 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
The bomb script spawn();s something, which doesn't get killed by a screenchange. However, the spawned script has a sprite number which it modifies. I don't know what script it spawns, but adding

script_attach(0);

as the first line in the main procedure of the spawned script might prevent it.

0, like 1000, is no real sprite number. 1000 means "float around and don't die on a screenchange" (which basically makes it equivalent to a spawned script). 0 means "float around and die on a screenchange".
August 20th 2006, 07:21 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
It's working I think Might want someone to double check that. It spawns dam-bom.c.

Add: I figured it had something to do with spawning, but I was too dumb to think of that.

Haha feel the fury of 100 bombs being layed without bugging up the game
August 20th 2006, 09:40 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
Stupid question, but what category should I upload my stackable items example to?
August 21st 2006, 04:53 PM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
Wouldn't that be problematic if you lay out more than one bomb at a time? I'm quite certain that's possible... unless I've missed something.
August 21st 2006, 05:26 PM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
Yes, more than one bomb is possible. Still with my script. I only change its "survive screenchange" attribute.

Why would it go wrong?

"item-bom" spawns "dam-bom" in its use() proc. "dam-bom" creates the bomb sprite, and thus has a reference to its own bomb. A new "dam-bom" (spawned by another "item-bom") creates another bomb sprite, with a number different than the previous bomb sprite (engine does this). Both can be attached to 0 at the same time, because 0 is a "fake sprite". Multiple scripts can be attached to 1000 too.
August 21st 2006, 08:52 PM
slayer.gif
rabidwolf9
Peasant He/Him United States
twitch.tv/rabidwolf9 
And on top of what magicman said, I tested it and it does in fact work. Proof? Download my stackable items file whenever someone puts it up