I'm making a space invaders type minigame as one of the unlockable secrets in one of my nearing completion games. There are little asteriods above you that you can hide behind. Like in space invaders, I want it so that if they get hit by a laser, that part will get blown off.
Here's the code I have for it:
>if laser collides with backdrop(the asteroids)
-create a "black dot" object at (0,0) from the laser.
>always
-paste "black dot" into background as not an obstacle.
-destroy "black dot"
This does cover up the part that was blown off, but if I shoot it again, it still thinks it's colliding with the blown off part of the asteroid instead of going over the non-obstacle bown off part( in short, it thinks it's colliding with the empty space ). I'm using MMF 1.5.
Does anyone know what I'm doing wrong here or how I can work around this?
@Biax: I just tried creating a background system object at 0,0 from the laser, but it didn't work any better. Do you mean something else by "try using "add backdrop" instead of "paste into background""?
@IceKirby: yes, that would work, but then there'd be a bunch of "black spot" active objects on runtime and that'd make the gaem eventually crash.