prominentalex Posted April 10, 2014 Report Share Posted April 10, 2014 Is it possible to have the blood count green when at 12000, then yellow at 8000 and then switch to red at like 5000? Thought it would be a cool feature, just interested if that would be possible. Link to comment Share on other sites More sharing options...
0 Sukkaed Posted April 10, 2014 Report Share Posted April 10, 2014 Should be. My first thought would be to make 3 debug monitors and use switch case to change between them, depending of blood amount. Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 10, 2014 Author Report Share Posted April 10, 2014 I hope I could get something like this working... Link to comment Share on other sites More sharing options...
0 cen Posted April 10, 2014 Report Share Posted April 10, 2014 You could do something like this: _bloodTotal = r_player_blood; _ctrlBlood ctrlSetText str(_bloodTotal); switch true do { case (r_player_blood > 10000): { _ctrlBlood ctrlSetTextColor [0.6, 0.73, 0.0, 0.75]; }; case ((r_player_blood > 5000) and (r_player_blood <= 9999)): { _ctrlBlood ctrlSetTextColor [0.8, 0.93, 0.39, 0.75]; }; case ((r_player_blood > 2000) and (r_player_blood <= 4999)): { _ctrlBlood ctrlSetTextColor [0.96, 0.96, 0.24, 0.75]; }; case ((r_player_blood > 1) and (r_player_blood <= 1999)): { _ctrlBlood ctrlSetTextColor [0.93, 0.66, 0.26, 0.75]; }; default { _ctrlBlood ctrlSetTextColor [1.0, 0.0, 0.0, 0.75]; }; }; Link to comment Share on other sites More sharing options...
0 Sukkaed Posted April 10, 2014 Report Share Posted April 10, 2014 Does that work in debug monitor? Link to comment Share on other sites More sharing options...
0 fr1nk Posted April 10, 2014 Report Share Posted April 10, 2014 I remember being on a Namalsk server where the body temperature stat would change color depending on how high/low it was, so I imagine the same is possible for blood levels. Link to comment Share on other sites More sharing options...
0 Sukkaed Posted April 10, 2014 Report Share Posted April 10, 2014 Well, here is my "dirty" version but it works :) debug_monitor = { _color = _this select 0; switch (_color) do { case "green": { hintSilent parseText format [" <t size='1' font='Bitstream' align='left' color='#00FF00'>Blood: </t><t size='1' font='Zeppelin33' color='#00FF00' align='right'>%1</t><br/> ", r_player_blood ]; }; case "yellow": { hintSilent parseText format [" <t size='1' font='Bitstream' align='left' color='#FFFF00'>Blood: </t><t size='1' font='Zeppelin33' color='#FFFF00' align='right'>%1</t><br/> ", r_player_blood ]; }; case "red": { hintSilent parseText format [" <t size='1' font='Bitstream' align='left' color='#FF0000'>Blood: </t><t size='1' font='Zeppelin33' color='#FF0000' align='right'>%1</t><br/> ", r_player_blood ]; }; }; }; while {alive player} do { while {(r_player_blood > 8000)} do { ["green"] spawn debug_monitor; sleep 1; }; while {(r_player_blood <= 8000) and (r_player_blood >= 5000)} do { ["yellow"] spawn debug_monitor; sleep 1; }; while {(r_player_blood < 5000)} do { ["red"] spawn debug_monitor; sleep 1; }; }; Just change while {alive player} do { to whatever that keeps your debug on. insertcoins 1 Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 10, 2014 Author Report Share Posted April 10, 2014 How could I incoporate that with this? while {debugMonitor} do { _logo = "scripts\wolf.paa"; _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750]; _textCity = "Wilderness"; if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)}; if (player == vehicle player) then { _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture')); } else { _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); }; _timeleft= _combattimeout-time; _kills = player getVariable["zombieKills",0]; _killsH = player getVariable["humanKills",0]; _killsB = player getVariable["banditKills",0]; _humanity = player getVariable["humanity",0]; hintSilent parseText format [ " <img size='6' image='%9'/> <br/> <t size='1' font='Bitstream'align='center'>www.wolfpackdayz.enjin.com</t><br/> <t size='1' font='Bitstream'align='center'>TS52.gameservers.com:9314</t> <br/> <br/> <t size='1' font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%11</t><br/> <t size='1' font='Bitstream'align='left'>Blood:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%1</t><br/> <t size='1' font='Bitstream'align='left'>Humanity:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%2</t><br/> <t size='1' font='Bitstream'align='left'>Heroes Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%3</t><br/> <t size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%4</t><br/> <t size='1' font='Bitstream'align='left'>Zombies Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%5</t><br/> <t size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%10</t><br/> <t size='1' font='Bitstream'align='left'>Survived:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%6 Dayz</t> <br/> <br/> <t size='1' font='Bitstream'align='center'color='#00FFFF'>Restart in %7 minutes!</t> <br/> <img size='6' image='%8'/> <br/> ", r_player_blood, //1 round _humanity, //2 _killsH, //3 _killsB, //4 _kills, //5 (dayz_Survived), //6 (180-(round(serverTime/60))), //7 change the 180 to suit your server mins for restarts _pic, //8 _logo, //9 diag_fps, //10 _textCity //11 ]; sleep 1; }; Link to comment Share on other sites More sharing options...
0 Sukkaed Posted April 11, 2014 Report Share Posted April 11, 2014 This must be record for longest debug monitor code :) debug_monitor = { _color = _this select 0; _logo = "scripts\wolf.paa"; _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); _nearestCity = nearestLocations [getPos player, ["NameCityCapital","NameCity","NameVillage","NameLocal"],750]; _textCity = "Wilderness"; if (count _nearestCity > 0) then {_textCity = text (_nearestCity select 0)}; if (player == vehicle player) then { _pic = (gettext (configFile >> 'cfgWeapons' >> (currentWeapon player) >> 'picture')); }else{ _pic = (gettext (configFile >> 'CfgVehicles' >> (typeof vehicle player) >> 'picture')); }; _timeleft= _combattimeout-time; _kills = player getVariable["zombieKills",0]; _killsH = player getVariable["humanKills",0]; _killsB = player getVariable["banditKills",0]; _humanity = player getVariable["humanity",0]; switch (_color) do { case "green": { hintSilent parseText format [" <img size='6' image='%9'/> <br/> <t size='1' font='Bitstream'align='center'>www.wolfpackdayz.enjin.com</t><br/> <t size='1' font='Bitstream'align='center'>TS52.gameservers.com:9314</t> <br/> <br/> <t size='1' font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%11</t><br/> <t size='1' font='Bitstream'align='left'color='#00FF00'>Blood:</t><t size='1' font='Bitstream'align='right'color='#00FF00'>%1</t><br/> <t size='1' font='Bitstream'align='left'>Humanity:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%2</t><br/> <t size='1' font='Bitstream'align='left'>Heroes Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%3</t><br/> <t size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%4</t><br/> <t size='1' font='Bitstream'align='left'>Zombies Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%5</t><br/> <t size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%10</t><br/> <t size='1' font='Bitstream'align='left'>Survived:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%6 Dayz</t> <br/> <br/> <t size='1' font='Bitstream'align='center'color='#00FFFF'>Restart in %7 minutes!</t> <br/> <img size='6' image='%8'/> <br/> ", r_player_blood, //1 round _humanity, //2 _killsH, //3 _killsB, //4 _kills, //5 (dayz_Survived), //6 (180-(round(serverTime/60))), //7 _pic, //8 _logo, //9 diag_fps, //10 _textCity //11 ]; }; case "yellow": { hintSilent parseText format [" <img size='6' image='%9'/> <br/> <t size='1' font='Bitstream'align='center'>www.wolfpackdayz.enjin.com</t><br/> <t size='1' font='Bitstream'align='center'>TS52.gameservers.com:9314</t> <br/> <br/> <t size='1' font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%11</t><br/> <t size='1' font='Bitstream'align='left'color='#FFFF00'>Blood:</t><t size='1' font='Bitstream'align='right'color='#FFFF00'>%1</t><br/> <t size='1' font='Bitstream'align='left'>Humanity:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%2</t><br/> <t size='1' font='Bitstream'align='left'>Heroes Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%3</t><br/> <t size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%4</t><br/> <t size='1' font='Bitstream'align='left'>Zombies Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%5</t><br/> <t size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%10</t><br/> <t size='1' font='Bitstream'align='left'>Survived:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%6 Dayz</t> <br/> <br/> <t size='1' font='Bitstream'align='center'color='#00FFFF'>Restart in %7 minutes!</t> <br/> <img size='6' image='%8'/> <br/> ", r_player_blood, //1 round _humanity, //2 _killsH, //3 _killsB, //4 _kills, //5 (dayz_Survived), //6 (180-(round(serverTime/60))), //7 _pic, //8 _logo, //9 diag_fps, //10 _textCity //11 ]; }; case "red": { hintSilent parseText format [" <img size='6' image='%9'/> <br/> <t size='1' font='Bitstream'align='center'>www.wolfpackdayz.enjin.com</t><br/> <t size='1' font='Bitstream'align='center'>TS52.gameservers.com:9314</t> <br/> <br/> <t size='1' font='Bitstream'align='left'>Location:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%11</t><br/> <t size='1' font='Bitstream'align='left'color='#FF0000'>Blood:</t><t size='1' font='Bitstream'align='right'color='#FF0000'>%1</t><br/> <t size='1' font='Bitstream'align='left'>Humanity:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%2</t><br/> <t size='1' font='Bitstream'align='left'>Heroes Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%3</t><br/> <t size='1' font='Bitstream'align='left'>Bandits Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%4</t><br/> <t size='1' font='Bitstream'align='left'>Zombies Killed:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%5</t><br/> <t size='1' font='Bitstream'align='left'>FPS: </t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%10</t><br/> <t size='1' font='Bitstream'align='left'>Survived:</t><t size='1' font='Bitstream'align='right'color='#00FFFF'>%6 Dayz</t> <br/> <br/> <t size='1' font='Bitstream'align='center'color='#00FFFF'>Restart in %7 minutes!</t> <br/> <img size='6' image='%8'/> <br/> ", r_player_blood, //1 round _humanity, //2 _killsH, //3 _killsB, //4 _kills, //5 (dayz_Survived), //6 (180-(round(serverTime/60))), //7 _pic, //8 _logo, //9 diag_fps, //10 _textCity //11 ]; }; }; }; while {debugMonitor} do { while {(r_player_blood > 8000)} do { ["green"] spawn debug_monitor; sleep 1; }; while {(r_player_blood <= 8000) and (r_player_blood >= 5000)} do { ["yellow"] spawn debug_monitor; sleep 1; }; while {(r_player_blood < 5000)} do { ["red"] spawn debug_monitor; sleep 1; }; }; Link to comment Share on other sites More sharing options...
0 prominentalex Posted April 11, 2014 Author Report Share Posted April 11, 2014 Works flawlessly! I appreciate it! Link to comment Share on other sites More sharing options...
Question
prominentalex
Is it possible to have the blood count green when at 12000, then yellow at 8000 and then switch to red at like 5000? Thought it would be a cool feature, just interested if that would be possible.
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now