Okay, so I'm having trouble with something. My goal are simple. I want to pick the first five closest items to the player, and always shoot at them or whatever. I took a look at the Advanced Direction Object example. It has what I want, except it only pick the first closest enemy. I'm looking for it to pick the first five enemies. Any help?
Someone else will have to create the code as I suck at this type of stuff, but basically this:
Once you find the distance between the player and the first object - change a flag or variable of the object to "deactivate" it.
ie:
Distance finding code finds Object 1
- Set object 1 flag 0 on
Once that is done just run the event 4 more times, changing the flags/variables as you go. When you "search" for the closest object be sure to include an event that skips the object if its Flag 0(or whatever other value you choose) is on.
Given that you already have the closest object events down you may be able to adapt something out of this. If not you'll just have to wait for someone else because I'm awful (sorry.)
Ahhh, this makes me dream of mech's targetting a whole heap of F00's, then launch missiles in sequence... Ooh! A short delay between targetting too! Yummy...