View Full Version : Flee function override
chichi77
02-28-2004, 05:57 AM
Hi all, I want to make an alternative script function to the original flee function, but I don't know how to define such an function. So anybady has any clues? Thanks in advance.
Ranger
02-28-2004, 10:57 AM
What the hell are you talking about? Never heard of any "flee" function.
MajorTom
02-28-2004, 11:08 AM
You can write an alternative script for the AIpilot so that he will preform the task: (for example)
Go to a certain location
wait a certain amount of time
heal
go back and help the player
Say you put that script function as: GoWaitHealComeback in your package: mypackage
Then you can use:
iAI.SetFleeFunction( hship damaged_aiship, "mypackage.GoWaitHealComeback" );
The threshold at which the Ai pilot will actually flee
is defined as you setup the Ai Pilot in: iShip.InstallAIPilot( with paramaters as described in the pog sdk)
You can, of course, set your "mypackage.GoWaitHealComeback" as the flee_function directly in iShip.InstallAIPilot (...); when you initially set up your AiPilot if you know that you won't be using any other (situation dependent) alternative flee scripts.
chichi77
02-28-2004, 10:45 PM
The details go to I-War 2 forum. :)
;)
vBulletin® v3.7.2, Copyright ©2000-2009, Jelsoft Enterprises Ltd.