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

Reply
 
Thread Tools Display Modes
  #1  
Old 08-05-2012, 11:55 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default CountAiGroundActor ??? I want to count how many Static objects

HI, I want to see how many Static objects I have in my mission at any one time.

Is there a way to see this?

I wrote this below but does not show me the number when I call it in Menu. Any ideas?

Code:
GamePlay.gpLogServer(new Player[] { player }, "Ground Unit Count: RAF {0}      LWA {1} ", new object[] { CountAiGroundActor(1), CountAiGroundActor(2) });
Code:
    /*------------AI Ground Units Select------------*/
    public int CountAiGroundActor(int Army)
    {
        int NumberOfStaticObjects = 0;

        if (GamePlay.gpGroundGroups(Army) != null) return 0;
        foreach (AiGroundGroup gg in GamePlay.gpGroundGroups(Army))
        {
            NumberOfStaticObjects += 1;
        }
        return NumberOfStaticObjects;
    }
__________________
__________________
Win7, 64bit Ultra
Asus P8P67Pro MB
Intel i7-2600K
Coursair 16GB (4x 4GB), DDR3-1600MHz
Gainward Nvidia 580GTX 3GB DDR5
850-Watt Modular Power Supply
WIN7 and COD on Gskill SSD 240GB
40" Panasonic LCD
TrackIR5 +
Thrustmaster Warthog stick, throttle & pedals
Reply With Quote
  #2  
Old 08-05-2012, 06:17 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

To get the number of all Statics you can use:
Code:
public int CountStatic()
{
    return GamePlay.gpGroundStationarys().Length;
}
Reply With Quote
Reply


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 08:34 PM.


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