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 04-04-2012, 03:31 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default How would I call a const string list to display on screen?

Hi,

I am trying to call a list on screen of objectives completed.
Is there a way to call the cost string into a list?

Code:
    const string Objective_P = "  German Supply Tankers Survived,";		//BlueObjective3   Survived
    const string Objective_Q = "  English Supply Tankers Survived,";	//RedObjective4    Survived
    const string Objective_R = "  English Supply Tankers Destroyed,";		//BlueObjective5    Destroyed	

    string Objective_Total_Red = "";
    string Objective_Total_Blue = "";
When an objective is completed I add the Objective to the String "string Objective_Total_Blue" like this
Code:
Objective_Total_Blue += (Objective_P);]
So when I want to display the accumulated list onscreen string " Objective_Total_Blue = ""; " How do I do it?
Code:
                        GamePlay.gpHUDLogCenter(new Player[] { player }, "Objective_Total_Red ("")": "Objective_Total_Blue("")", new object[] { Objective_Total_Red.ToString(), Objective_Total_Blue.ToString() });
__________________
__________________
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 04-04-2012, 06:02 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

To Add the string use (the strings should declared global):
Code:
Objective_Total_Blue += Objective_P;
To show the strings use:
Code:
GamePlay.gpHUDLogCenter(null, "Red Objective Total: {0} :: Blue Objective Total: {1} ", new object[] { Objective_Total_Red, Objective_Total_Blue });
But be aware not every player has a screenresolution of 1920*1080 or higher, so it would be better to show the strings with a timedelay.
Reply With Quote
  #3  
Old 04-04-2012, 06:23 AM
hc_wolf hc_wolf is offline
Approved Member
 
Join Date: Jul 2010
Posts: 439
Default

Thanks kodiak, i think I am getting the hang of those now

I have the global string already so thats good. Now this string code I am getting the hang of it and can use lots now. thanks.

Will test when i get home, code looks good and should work fine.

Thanks. I will be putting your name in lights for Credit in helping me build this new ATAG mega mission RedvBlue1.0.

2200 lines of coding and no errors feels goooood.
__________________
__________________
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
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 07:37 AM.


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