The Daily Click ::. Forums ::. Klik Coding Help ::. why will my collisions not work properly??
 

Post Reply  Post Oekaki 
 

Posted By Message

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
27th April, 2010 at 18:15:06 -

http://sites.google.com/site/lembi2001/Flipull.zip

I am trying to make a game similar to flipull http://en.wikipedia.org/wiki/Plotting_%28arcade_game%29 using mmf2 but i am having problems with my match testing. the problem comes when the two colliding shapes do not match.

The above zip file contains the mfa and my test level data.

I haven't commented the code yet but will be doing if I can get it working as i plan to release an open source version of the engine for people to use.

Here is a brief breakdown of the engine and the problem.

I have two objects Puzzle Block (PB) and Level Block (LB)
PB has to movement States - 1. Static and 2.Pinball Movement - used in non matching scenario
PB and LB both have the same alt vals of Movement Value and Anim Dir (they were cloned from each other)
PB is controlled by the player and LB is static.
PB Movement Value has 5 states:

0 = Stationary and follows player object
1 = moving horizontally
2 = moving vertically
3 = Collided with object and performing test
4 = no match

PB Anim Dir (PBAD) is set using a random value, LB Anim Dir (LBAD) is set using the level data and the Animation Directions of both PB and LB are Always set to the value of Anim Dir.

Start of Frame - PBAD=0
Player Presses Space - PBAD=1
PB collides with background - PBAD=2
PB collides with LB - PBAD=3

Now my match testing comes in to play

PB is overlapping LB and
PBAD = LBAD
Destroy both LB and PB

This appears to work correctly

The following doesn't:

PB is overlapping LB and
PBAD <> LBAD
Change PB movement to movement 2
Start Movement
Change PB Movement Value to 4

What happens is PB starts to move away from the blocks but then if it collides with any objects that have the some Anim Dir value it destorys them and itself.

I tried inserting Movement Value = 3 into the match test with no luck.

Can anyone help??

 
n/a

GamesterXIII



Registered
  04/12/2008
Points
  1110

I am an April Fool
27th April, 2010 at 19:00:48 -

Every time a download includes an extension that I do not have I immediately give up.

You could at least provide download links to the extensions or at the VERY least provide which extensions are needed.

 
n/a

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
27th April, 2010 at 19:43:59 -

Sorry

Didn't realise i had used any non standard extensions. the extensions in use are string tokenizer, ini and numeric up/down control object. the latter extension is only for the level editor and has no bearing on the problem i am having.

links to extensions:
Numeric Up Down Object - http://sites.google.com/site/mmf2stuff/Data/NumUpDown.zip
String Tokenizer - http://www.aquadasoft.com/StringTokenizer.zip

pretty sure ini is standard.

EDIT - Just thought i would let you all know i have fixed it!!! I have added a PB is Stopped to the Match event and this has resolved it.


Edited by lembi2001

 
n/a

lembi2001



Registered
  01/04/2005
Points
  608

VIP MemberIt's-a me, Mario!Wii OwnerI like Aliens!Has Donated, Thank You!PS3 OwnerI am an April Fool
28th April, 2010 at 11:55:08 -

Just thought i would let you all know i have fixed it!!! I have added a PB is Stopped to the Match event and this has resolved it.

have edited previous post but wanted to Bump it to top of list.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click