Actor Collisions Not Working.

Daniel.havensDaniel.havens Member Posts: 1
edited June 2012 in Working with GS (Mac)
Hey GS users,


I recently picked up GS and have made some progress grasping it's capabilities. Lately, however, i've been running into some issues and wanted to see if anyone else out there has encountered the problems, or if any one has solutions.

So here it goes:

I have an actor with upward of 20 rules in it. It is the main character Actor in a platforming-like game. In the last few renditions of my game, as I've added more rules and changed some of the methods I do things to improve performance, I've noticed that my actor collisions aren't registering.

The base "collision" functions work just fine, it is only rules that say "when actor overlaps or collides with actor type etc...".

For example, I have a rule that resets the characters jump count when he comes into contact with an actor with the name "ground".

The rule reads:

"if actor overlaps of collides with actor type "ground" then: change attribute 'jumpCount' = 0"

It's a simple rule and one that I would think wouldn't cause a problem.

I did a work around by creating a game.jumpCount as opposed to self.jumpCount, and had the "ground" actor deal with the collision, and this fixed it.

However now i'm finding more and more of these collisions that are broken.

Any ideas?


Cheers,

D

Best Answer

  • fadamionfadamion Posts: 309
    Accepted Answer
    Well you sound like what you are doing is fine. Ive noticed once code gets heavy things stop working for two reasons 1 code is illogical or 2 just to much going on at once. But for me its normally 1 things get better after you get in to it more read the timers are for chumps article here on gamesalad.

Answers

  • Daniel.havensDaniel.havens Member Posts: 1
    Awesome article. My code is all logical, but I definitely think it has to do with me pushing the system to hard and not knowing all the improved performance work-arounds, plus my only way of testing currently is though GS's built in viewer, which I've read is finicky most of the times any ways. Can't even web preview because I'm using tables.

    I appreciate your quick response!

    Thanks.
Sign In or Register to comment.