Problems with object selection
First off, I just want to point out that this works in normal MMF exe and in debug. It does NOT work in Flash running in a browser (IE).
With that said, I am not sure if this is a problem with object selection in general, or possibly a problem with selecting objects based on the animation direction they are using.
When I detect bullets hitting an enemy, I spread value, then run an "ID" loop against all my enemies. If the bullet is overlapping an enemy that matches the "ID" loop index, I run another loop that does a few things and then destroys the enemy. This second loop checks to see which enemy is overlapping the bullet, and in some cases it checks to see what direction the enemy is facing. The enemies that do this direction check end up destroying all enemies of this type. Again, this works in normal MMF, so I am guessing it has to do with how Flash is handling things.
Now, I use multiple anim directions as a way to make different visual versions of enemies, instead of unique enemies. It has worked well for me up until now. Does anyone know if this method of using anim directions is a bad idea for Flash? Also, I seem to have problems where I create an object and then immediately set the object's direction. In Flash, this results in the object just using the default direction of 0.
Any help with this would be really appreciated. I'm beginning to pull my hair out on this one. :(
Mobichan
Re: Problems with object selection
I haven't experienced problems using animation direction to represent different states of an object in Flash...
It sounds like you have some idea of what causes the bug and what doesn't, though - can you upload an example file?
Re: Problems with object selection
I'll try and strip it down to the basics.
Re: Problems with object selection
File uploaded in the archives here: http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=180851&#Post180 851
There is an explanation in the other post on how to reproduce the bug.
Re: Problems with object selection
If you have not yet noticed a bunch of these new forums allow file uploads.
Re: Problems with object selection
Doh! Thanks for the heads up Jeff. :) I usually use the quick reply so I don't see it.
Re: Problems with object selection
Sorry, I have run the C++ version and the Flash version, and I cant see any difference. Can you extract the problem a bit more please?
Re: Problems with object selection
You can pop the balloons 2 ways. If you hit them within 10 pixels of their bottom, you will see the bug. Just make sure there are more than one enemy on the screen when you do it. ;) You will know you did it when the carriage under the balloon falls.
Re: Problems with object selection
Sorry to bump this, but has anyone been able to reproduce the bug I am talking about? I really need to solve this asap, as it is for work.
Re: Problems with object selection
I can confirm the problem. Sometimes when one enemy is hit, all the enemies get destroyed. This problem happens with the Flash runtime only.
I've tried to fiddle with the app, but I couldn't find any solution. But mobichan, why are you using fastloops? Did you know that your example works the same without fastloops?
Nice little game BTW.