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
  #1  
Old 09-20-2012, 06:31 PM
frantic69 frantic69 is offline
Approved Member
 
Join Date: Mar 2010
Posts: 17
Default ActorByName stupid question

Hello,

This question, I am sure, is going to be stupid but I can't my error so I would like yout help.

I just want to do something very simple. I have a basic mission. Two aircraft. One spitfire is the player aicraft. the second one is an AI aircraft.

I just want to show on the screen the IAS of the AI aircraft. I tryed this code but it doesn't work :


AiActor actor1 = GamePlay.gpActorByName("0:BoB_RAF_F_111Sqn_Early.0 00");
actor1AC = (AiAircraft)actor1;

I_VelocityIAS = actor1AC.getParameter(part.ParameterTypes.I_Veloci tyIAS, -1);
GamePlay.gpHUDLogCenter(I_VelocityIAS.ToString("0. 00"));


Here is the information of the mission file :

[PARTS]
core.100
bob.100
[MAIN]
MAP Land$English_Channel_1940
BattleArea 150000 100000 100000 150000 1000
TIME 12
WeatherIndex 0
CloudsHeight 1000
BreezeActivity 10
ThermalActivity 10
player BoB_RAF_F_FatCat_Early.010
[GlobalWind_0]
Power 3.000 0.000 0.000
BottomBound 0.00
TopBound 1500.00
GustPower 5
GustAngle 45
[splines]
[AirGroups]
BoB_RAF_F_111Sqn_Early.01
BoB_RAF_F_FatCat_Early.02
[BoB_RAF_F_111Sqn_Early.01]
Flight0 1
Class Aircraft.SpitfireMkIIa
Formation VIC3
CallSign 30
Fuel 100
Weapons 1
Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_RAF_F_111Sqn_Early.01_Way]
NORMFLY 223611.44 219441.60 500.00 300.00
NORMFLY 224401.69 221617.65 600.00 300.00
NORMFLY 226420.38 223833.00 800.00 300.00
NORMFLY 227804.64 224893.02 900.00 300.00
NORMFLY 228776.17 226076.11 900.00 300.00
NORMFLY 228164.13 227020.51 900.00 300.00
NORMFLY 226536.33 228066.96 900.00 300.00
NORMFLY 223687.67 227233.68 1000.00 330.00
NORMFLY 222253.65 223435.46 1200.00 350.00
NORMFLY 220974.66 211982.69 500.00 300.00
[BoB_RAF_F_FatCat_Early.02]
Flight1 11
Class Aircraft.SpitfireMkIIa
Formation VIC3
CallSign 26
Fuel 100
Weapons 1
Skill 0.3 0.3 0.3 0.3 0.3 0.3 0.3 0.3
[BoB_RAF_F_FatCat_Early.02_Way]
NORMFLY 223596.35 219416.27 500.00 300.00
[CustomChiefs]
[Stationary]
[Buildings]
[BuildingsLinks]

As you can see, the AI aircraft is from the 111 suadron. It ID in the mission file is BoB_RAF_F_111Sqn_Early.01. If I am not wrong, the name to put in the script is a bit different : 0:BoB_RAF_F_111Sqn_Early.000

But, it doesn't work. Could you tell me if you have any idea. Either by modifiying my code or if you have any code that works.

Thank you

Last edited by frantic69; 09-20-2012 at 08:12 PM.
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:43 PM.


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