bomb bug still here
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.
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".
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".
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
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
Stupid question, but what category should I upload my stackable items example to?
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.
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.
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.
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