The Daily Click ::. Forums ::. Klik Coding Help ::. Backdrop masking Space Invaders
 

Post Reply  Post Oekaki 
 

Posted By Message

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
31st March, 2004 at 18:52:11 -

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?

 
n/a

cake



Registered
  13/12/2002
Points
  1173
31st March, 2004 at 19:10:04 -

Um, try using "add backdrop" instead of "paste into background". I think that's the issue, but I couldnt be sure

 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
31st March, 2004 at 19:17:41 -

>if laser collides with backdrop(the asteroids)
>+X(negate) laser is overlapping blackdot
-create a "black dot" object at (0,0) from the laser.


 
Mr Icekirby says so!
OBEY ME!

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
31st March, 2004 at 19:40:35 -

@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.

 
n/a

Mr Icekirby



Registered
  18/12/2003
Points
  846
31st March, 2004 at 20:31:32 -

thats why you add a ram requirement!

 
Mr Icekirby says so!
OBEY ME!

ChrisB

Crazy?

Registered
  16/08/2002
Points
  5457
1st April, 2004 at 18:23:59 -

Snerlin: He means you use the 'Add backdrop' action instead of 'Paste into background'.

edit: moo

Image Edited by the Author.

 
n/a

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
2nd April, 2004 at 06:07:45 -

I've never used the "add backdrop" action before. Where is it?

 
n/a

Shen

Possibly Insane

Registered
  14/05/2002
Points
  3497
2nd April, 2004 at 07:03:58 -

In Animation, just above Paste into Background

 
gone fishin'
   

Post Reply



 



Advertisement

Worth A Click