Jump to content
Sign in to follow this  
Khalashnikovf

Checking and controling height of flight with AI

Recommended Posts

Hello there, I would to ask on this problem, because when yo put AI in to big Heights, it will do mess. It fyling still into the circle and trying to fly into bigger heights etc.

So I would like to make a script where your plane would be controlled by some mathematics.

height = 2000;

real = 2000;

hercules flyInHeight height;

while { 1 > 0 } do {

((getPosASL hercules) select 2) = actual;

if ( actual hercules != vysledna ) then {

real = ((actual - height) + height);

hercules flyInHeight real;

} else {

titleText [" ","PLAIN DOWN"];

};

sleep 0.01;

};

so this should check height of plane and reduce it for that like its flying still straight forward in height and AI should not recognize that there is some hills and valley down there ... but its not working, pls help.

I want to make a HALO jump, but I cant make a long fly to Breifing in plain.

And Halo Jump from 1000 metres ... so,thats just not much HALO :)

Share this post


Link to post
Share on other sites

I'd expect that executing the "flyInHeight" command every 0.01 of a second will never work.

Try;

sleep 4

It very unlikely you'll be able to command the AI straight-n-level flying via commands direct to the AI pilot.

Share this post


Link to post
Share on other sites
Gnat;1703530']I'd expect that executing the "flyInHeight" command every 0.01 of a second will never work.

Try;

sleep 4

It very unlikely you'll be able to command the AI straight-n-level flying via commands direct to the AI pilot.

One quick question .. How does works that FlyinHeight?

Is it taken allways from ASL or it is from Actual Level of height from land?

Share this post


Link to post
Share on other sites

If this is for a HALO jump in your mission, why don't you just record the plane's path using UnitCapture/UnitPlay?

But since you posted it in configs & scripting I'd have to assume this is for an addon... :raisebrow:

Share this post


Link to post
Share on other sites
If this is for a HALO jump in your mission, why don't you just record the plane's path using UnitCapture/UnitPlay?

But since you posted it in configs & scripting I'd have to assume this is for an addon... :raisebrow:

No,its for Mission? But it is script right?

So, off topic of Section ... Can I record path of Flight and then use it for AI ?

Im going to search for something :)

EDIT:

Well, there is nothing like UnitCapture/Play in Scripting Commands.

http://community.bistudio.com/wiki/Category:Scripting_Commands

So, where can I find some info? :(

Edited by Khalashnikovf

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×