The Daily Click ::. Forums ::. Klik Coding Help ::. Problem with collisions on a puzzle
 

Post Reply  Post Oekaki 
 

Posted By Message

7Soul



Registered
  12/08/2008
Points
  167
13th June, 2009 at 21:08:10 -

Im trying to make a puzzle game, where when you shot at a red block, all adjacent red blocks are destroyed, and the same with other colors

To detect that a red block is close do another one, i created a small particle that is shot from a destroyed block to every 4 directions, and if they collide with another block, it destroys it, creating a chain effect

The problem is that sometimes a block is not destructed when it should be

Here are some examples:

http://img193.imageshack.us/img193/2294/redproblems.png

And here is the code for the particles and block destruction:

(the loop "tiro" is the one that moves the bullet upwards)
(loop "red" is the one that moves each of the 4 collision detection particles to each side, and detects collisions rapidly)
http://img196.imageshack.us/img196/2080/mmf2puzzleproblem.png

Please help D:


 
n/a

7Soul



Registered
  12/08/2008
Points
  167
14th June, 2009 at 00:46:34 -

RESOLVED

I just had to create another loop to handle the collisions

 
n/a
   

Post Reply



 



Advertisement

Worth A Click