Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   AI actors: airport.cpp, baseAntiAir.cpp, bus_car.cpp, car.cpp, emrg_car.cpp (http://forum.fulqrumpublishing.com/showthread.php?t=26673)

salmo 10-02-2011 07:42 PM

AI actors: airport.cpp, baseAntiAir.cpp, bus_car.cpp, car.cpp, emrg_car.cpp
 
Don't you just love the way that mission builders are kept in the dark (with no FMB documentation) & have to figure things out for themselves? :-P

I have some question regarding the AI section in FMB. There are three types of AI: Airfield, AntiAir, Ground. To these you can apply six AI actors: airport.cpp, baseAntiAir.cpp, bus_car.cpp, car.cpp, emrg_car.cpp, powerOn.cpp .... Can anyone shed light on these *.cpp elements?

powerOn.cpp
I believe this is used for searchlights. I've put searchlight & generator within the poweron.cpp radius & "set" the searchlight to the AI control but no searchlights go on when enemy planes overhead at night-time. :(

car.cpp
I believe that car.cpp gets a vehicle to follow a sline road back & forwards indefinitely, but I can't seem to get it to do this. I've positioned a spline roadway within the car.cpp radius, placed a vehicle within the car.cpp radius, "set" the vehicle to the AI control, but no joy :(

Also, anyone know how to "attach" a trailer to a moving vehicle?

FG28_Kodiak 10-02-2011 07:49 PM

@power on
Do you have attach a Airfield AI also?

@car
do you select the spline with the target command (waypoint)

salmo 10-02-2011 07:52 PM

Quote:

Originally Posted by FG28_Kodiak (Post 343108)
@power on
Do you have attach a Airfield AI also?

Forgot to mention, I also have a baseAntiAir.cpp

Quote:

Originally Posted by FG28_Kodiak (Post 343108)
@car
do you select the spline with the target command (waypoint)

You can set the vehicle to the sline roadway, but the vehicle just travels down the roadway (one-way) & doesn't turn around & come back

FG28_Kodiak 10-02-2011 07:57 PM

1 Attachment(s)
Quote:

Originally Posted by salmo (Post 343110)
Forgot to mention, I also have a baseAntiAir.cpp

No not this there must be a entry called AI, in the menu you select your planes, trains etc. Sorry have a german Version so i don't know exactly how this menues looks in other language versions. Make a Airfield Ai select the radius and connect the generators with this AI via target selection.
Quote:

Originally Posted by salmo (Post 343110)
The spline roadway cannot be set to the vehicle, FMB wants to set to the AI car.cpp control.

Yepp this is correct, set the actor to NPC and car.cpp then the car follow the Spline Road to its end and vice versa after you select a waypoint target.

Attachment sample searchlight mission

salmo 10-02-2011 08:15 PM

OK, I see how the searchlights are setup. Can you supply a car.cpp example please?

FG28_Kodiak 10-02-2011 08:27 PM

1 Attachment(s)
A mission i made with splineroads NPC with car.cpp

Mington 10-03-2011 10:15 AM

Kodiak may I ask please?

Quote:

if (!OverEnemyTeritory && GamePlay.gpFrontDistance(1, PlayerPlane.Pos().x, PlayerPlane.Pos().y) <= 0)
OverEnemyTeritory, is this a Maddox variable? I do not see this variable declared before it is used, is why I ask

This statement in the function/method- can you explain please how it works?

I can see that after this procedure I know if I am in enemy or friendly territory, this is very valuable for all of us, so I must ask you for the clues- thanks :)

Ming

FG28_Kodiak 10-03-2011 10:49 AM

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.

Lookaloft 10-03-2011 04:19 PM

Kodiak, bitte um Entschuldigung.
Es gelingt mir nicht die Stuka's aufsteigen zu lassen.

Lookaloft.

FG28_Kodiak 10-03-2011 04:31 PM

Im FMB bei den Stukas den Haken bei Untätig rausnehmen, ist ne ältere Multiplayer Übungskarte, die ich für mein Geschwader gebastelt habe. Und ich nur auf die Schnelle gepostet habe da jemand nach einem Beispiel für Fahrzeuge und Spline Straßen gefragt hat.

Du kannst auch das Script einbauen das ich hier gepostet habe:
http://forum.1cpublishing.eu/showthread.php?t=26402
damit kannst du die Flieger über das Kommunikationsmenü starten lassen.


All times are GMT. The time now is 08:38 PM.

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