News:

Rings of Reznor!

Main Menu

automatic fly to

Started by bearded, November 05, 2014, 11:39:32 AM

Previous topic - Next topic

bearded

I have a script that does a fly check and then assigns a random destination to fly to. would it be hard to assign nearest enemy instead?

stumpy

It's a little hard to be sure what you mean. Is a fly check a test to determine that a character is currently flying (MLOG_IsFlying) or that just that the character can fly (maybe hasAttribute)? For either case, you can get the position of the target object and use Goal_AddMove to tell the NPC to fly there. Depending on the flyer's faction, you can use getNearestHero or getNearestBaddy to find the nearest target object for him to fly to.

BTW, some of the above is assuming FFvT3R with an FFX-enabled mod.
Courage is knowing it might hurt, and doing it anyway. Stupidity is the same. And that's why life is hard. - Jeremy Goldberg