Jump to content
Sign in to follow this  
scottieb

hud color for tdm mission

Recommended Posts

gday guys just a quick one need to make the blufor blue in color and the opfor red in color for this hint box on a tdm mission im working on.

at the moment its just the standard color, brown background and white writing

class Item2

{

position[]={3744.906,0.44344097,2592.4656};

a=0;

b=0;

angle=-1.38056;

repeating=1;

age="UNKNOWN";

expCond="showscore";

expActiv="hint format [""BLUFOR: %1\n\nOPFOR: %2"", wscore, escore]; showscore = false";

class Effects

{

};

would also like to make the same color changes with this

TitleText [format["BLUFOR: %1\n\nOPFOR: %2", wscore, escore], "plain", 1]

ps, any way on changing the color of the hint box background also?

I can normally figure stuff out myself with many hours of research but i just cant seem to make sense of all the special characters and where they start and stop.

I very much appreciate you guys taking the time.

thanks.

Share this post


Link to post
Share on other sites

could someone please explain how to make the blufor word blue and the opfor word red please

hint format ["BLUFOR: %1/50\n\nOPFOR: %2/50", wscore, escore];

TitleText [format["BLUFOR: %1\n\nOPFOR: %2", wscore, escore], "plain", 1]

thankyou

Share this post


Link to post
Share on other sites

hey Zonekiller, thanks for pointing me there, i had a bit of a look on there before but just couldnt figure out how to link it all up

Share this post


Link to post
Share on other sites

this might work

without seeing all the code its hard to tell

str(anything) == will convert anything , arrays , numbers ect to text

expActiv="hint format [""BLUFOR: %1\n\nOPFOR: %2"", parseText <t color='#1464F4'>str(wscore)</t>, parseText <t color='#E31230'>str(escore)</t>]; showscore = false";

Share this post


Link to post
Share on other sites

sorry mate heres the rest of the code, my apologies.

eastdead.sqs

;script by TaNKIST

_unit = _this select 0

_wscore = wscore

_wscore = _wscore + 1

wscore = _wscore

publicvariable "wscore"

showscore = true

publicvariable "showscore"

exit

westdead.sqs

;script by TaNKIST

_unit = _this select 0

_escore = escore

_escore = _escore + 1

escore = _escore

publicvariable "escore"

showscore = true

publicvariable "showscore"

exit

outro.sqs

;script by TaNKIST

enableRadio false

;DisableUserInput true

_player_vehicle = vehicle player

?(playerside == west): player setpos getmarkerpos "Respawn_West"

?(playerside == east): player setpos getmarkerpos "Respawn_East"

removeallweapons player

?(_player_vehicle != player):deletevehicle _player_vehicle

_camera = "camera" camCreate [0,0,0]

_camera cameraEffect ["internal","back"]

_camera camSetTarget player

_camera camSetpos getpos camlogic1

_camera camSetFOV 1.000

_camera camCommit 0

@camCommitted _camera

TitleText [format["US: %1\n\nRF: %2", wscore, escore], "plain", 1]

_camera camSetpos getpos camlogic2

_camera camSetFOV 1.000

_camera camCommit 15

@camCommitted _camera

EnableRadio true

TitleText ["","Plain",0]

player switchCamera "INTERNAL"

player cameraEffect ["terminate","back"]

camDestroy _camera

~1

player cameraEffect ["terminate","back"]

camDestroy _camera

endofmission=true

Share this post


Link to post
Share on other sites

hint format ["BLUFOR: %1/50\n\nOPFOR: %2/50", parseText <t color='#1464F4'>str(wscore)</t>, parseText <t color='#E31230'>str(escore)</t>];

TitleText [format["BLUFOR: %1\n\nOPFOR: %2", parseText <t color='#1464F4'>str(wscore)</t>, parseText <t color='#E31230'>str(escore)</t>], "plain", 1];

should work fine then

Share this post


Link to post
Share on other sites

that looked like it would do the trick but it came up with invalid number in expression

Share this post


Link to post
Share on other sites

hint format ["BLUFOR: %1/50\n\nOPFOR: %2/50",

maybe remove the /50 not sure why there in there

if you need to divide the score by 50 it should be str(wscore / 50)

Share this post


Link to post
Share on other sites

ok mate thanks i will give it a try, appreciate your time :-)

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×