The Daily Click ::. Forums ::. Klik Coding Help ::. Collision detection with groups.
 

Post Reply  Post Oekaki 
 

Posted By Message

Nate Baker



Registered
  19/07/2010
Points
  12
17th January, 2011 at 03:50:06 -

I was wondering if any one else has a problem when using groups and collision detection. When a make a condition that says

leftDetectior is overlapping group.1
Baddie(Value A) = 1
LeftDetectior is not overlapping group.1
Baddie(Value A) = 0

The second condition doesn't work (the not overlapping one) but the first does. Is this a problem that can be fix in some way?

Thanks for looking!

 
n/a

HorrendousGames

Sourpuss

Registered
  31/10/2009
Points
  481

VIP MemberEvil klikerGame Of The Week Winner
17th January, 2011 at 08:21:36 -

I've run into that one quite a bit. Try placing the second code above the first one and change the condition to 'always', so rather it almost would sound like "always set that value to zero. unless...".

If it doesn't work, someone else might be able to elaborate.

 
/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/-=?=-/
That Really Hot Chick
now on the Xbox Live Marketplace!

http://marketplace.xbox.com/en-US/Product/That-Really-Hot-Chick/66acd000-77fe-1000-9115-d80258550942

http://www.create-games.com/project.asp?view=main&id=2160

Nate Baker



Registered
  19/07/2010
Points
  12
17th January, 2011 at 15:15:12 -

Image

The problem with that HorrendousGames is I am running my actual code in side a loop so adding always doesn't do much (I don't think). In the example above the small markers are for collision detection, the values I'm using turns on or off to state weather it's OK to move in a detection and the group is suppose to mark the object as solid. Also ignore the object force issues unless you thank it's critical to my main problem.

Edited by Nate Baker

 
n/a

Nate Baker



Registered
  19/07/2010
Points
  12
17th January, 2011 at 16:07:36 -

This is just another example that I hope better illustrates my point. The problem is that I obviously can run this loop once for every object in the game so I need to use groups. Should I keep trying to find a solution or just find another way?

Image

Edited by Nate Baker

 
n/a

Sketchy

Cornwall UK

Registered
  06/11/2004
Points
  1970

VIP MemberWeekly Picture Me This Round 43 Winner!Weekly Picture Me This Round 47 WinnerPicture Me This Round 49 Winner!
18th January, 2011 at 01:02:20 -

You can still do almost exactly what HG suggested - just use "on loop" instead of "always" (make sure you re-order the events so the value is set to 0 *before* you check for the overlap).

If you still have trouble, start over and scrap the fastloops - you can code detectors without them.

 
n/a
   

Post Reply



 



Advertisement

Worth A Click