Actor Collisions Not Working.
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
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
-
fadamion Posts: 309
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
I appreciate your quick response!
Thanks.