The Daily Click ::. Forums ::. Klik Coding Help ::. Problem with objects over other objects gaining their values

Post Reply  Post Oekaki 

Posted By Message


17th April, 2008 at 04:41:36 -

Hi there! I recently switched from TGF to MMF2 and found it mostly good, but there is one thing that is bugging me.

I have a grid of 100 objects ("tiles") each with an alterable value corresponding to their position in the grid (i.e. 1-100). Now and again i create a different object over the tile object and want it to take the tile's value. In TGF this was easy (i.e. If Object is overlapping tile, set Alterable Value A( "Object" )to Alterable Value A( "Tile" )

This worked fine in TGF. However, in MMF it tries to be too clever. When i have more than one object overlapping different tiles, rather than taking the value from the tile it is overlapping, the object takes it's value from the tile a different object is overlapping corresponding to which object was created first!! This is not what i want.

Any ideas? Hope this makes sense.Thanks

I love gold


Possibly Insane


VIP Member
17th April, 2008 at 13:00:54 -

If you're using a grid, there may be a more efficient way of doing this.

Create a 100x100 array and store the values in each position, instead of in the objects on screen. Then when a collision occurs, find the coordinate it would be at in the 100x100 array and retrieve the value from there.

Project: Roller Coaster is on it's way!

Post Reply



Worth A Click