#1
|
|||
|
|||
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 = ""; Code:
Objective_Total_Blue += (Objective_P);] 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 |
#2
|
|||
|
|||
To Add the string use (the strings should declared global):
Code:
Objective_Total_Blue += Objective_P; Code:
GamePlay.gpHUDLogCenter(null, "Red Objective Total: {0} :: Blue Objective Total: {1} ", new object[] { Objective_Total_Red, Objective_Total_Blue }); |
#3
|
|||
|
|||
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 |
|
|