Recent posts by TAKERONE on Kongregate

Flag Post

Topic: Game Programming / Hittest error - not the usual stuff, it's a tricky one!

Hi guys!

Thank you very much for all the answers, first of all to pl0xz0rz, I don’t know how I didn’t think of making the hitboxes bigger, that time it just didn’t seem logical, now I understand what the problem was and obviously could correct it out. (And raycasting looks an interesting thing too, though I agree with ArreatsChozen in that it would have been an overkill for this problem, but nonetheless I have read and will read after this stuff too) So I made my correnctions to my program already after pl0x0rz’s comment, I just didn’t write in here because I wanted to see if other people have any different ideas I can learn from, for example I really like and memorize Frostyfun’s solution which probably wouldn’t be written if I already had said that I was through my problem :-) So once again thank to all of you who have answered, and I hope your answers helped and will help to people other than me as well!

Have a nice and happy new year all!


Flag Post

Topic: Game Programming / Hittest error - not the usual stuff, it's a tricky one!

Hi guys,

I’ve been developing flash since years, I don’t think myself as a big deal as a developer (though I work as one at a multinational company). It’s only AS2.
The fact is that I have NEVER EVER wrote to a forum with any problem, I could solve everything I wanted to, but this time I don’t have the slightest idea about , and can’t find out what the problem is, and it’s driving me nuts. Maybe someone saw this error before, and can help me. Here is it:

Platform instances on the stage push their paths (their “this”) into an array automatically, then I “onEnterFrame” check if the character’s hittest MC (red) hits the said platform instances’ hittest MC (blue) (iterating through the array). It should be pretty straightforward, usually it works. But sometimes they doesn’t hit when they should, and I have no idea why.

Here is the source: (CS5.5)

Any idea would be greatly appreciated!