Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #8  
Old 10-03-2011, 10:49 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

no its not a maddox variable, i declare
bool OverEnemyTeritory = false;
at the beginning of the script.
with
public override void OnTickGame()
{
//Point3d P = PlayerPlane.Pos();

if (!OverEnemyTeritory && GamePlay.gpFrontDistance(1, PlayerPlane.Pos().x, PlayerPlane.Pos().y) <= 0)
{
GamePlay.gpHUDLogCenter("Sie befinden sich nun über Feindgebiet!");
OverEnemyTeritory = true;
}
else
{
OverEnemyTeritory = false;
}
}

this checks if the plane is near or over enemy teritory
GamePlay.GamePlay.gpFrontDistance(int army, double x, double y);
returns a double that gives the distance to enemy front (if exist)
it returns 0 if you are over enemy teritory or the area you specify.
if you would know the distance to friendly teritory simply set for army the same army you are.
Before you should check with GamePlay.gpFrontExist() (returns bool) if a front (frontmarkers) exist.

Last edited by FG28_Kodiak; 10-03-2011 at 10:52 AM.
Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:28 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.