I'm trying to make it so then when I shoot the enemy object, it respawns at a random part of the map in a different color. I got the color thing set, but I have one problem: Due to the way the playfield is set up, I can only have the player come out from four specified areas of the map.
I have worked out some code using "rand", but it doesn't seem to be working.
d = 0 [...] if collision(player0,missile1) then d = rand if rand < 4 then d = 4 if d = 1 then player0x = 80 : player0y = 10 if d = 2 then player0x = 140 : player0y = 50 if d = 3 then player0x = 85 : player0y = 90 if d = 4 then player0x = 10 : player0y = 50
The missile doesn't seem to even affect the enemy, it just goes right through it.
Any idea on what I can do?