Jump to content
jsmith82

Dynamic statistics on “rugged large screen”

Recommended Posts

Before I burn 10 hours chasing my tail, is it possible to show text on the screen of the object “rugged large screen” tv object?  I’ve already added custom images to my scenario file, and I can call on those and show them no problem.  What I’d like to do is show information about the scenario such as kills, completed missions, game clock, basically a handful of variables I already have and am showing elsewhere.

 

is it possible to show dynamic information, or am I stuck loading static images?

 

Thanks in advance!

Share this post


Link to post
Share on other sites

Hi, yes it is possible thanks to procedural textures. You can create text and show all possible variables. Here i created simple script to show you how it can be done.
To test this, open empty mission, place player, few unarmed enemies and a screen which object variable name is TV. Then copy paste this code to debug console and execute. Everytime you kill someone the screen will be updated with the number of kills. I'm sure you'll manage to implement similar code into whatever you're doing. If not, do not hesitate and ask for further assistance 🙂.

//run this code in debug console-script serves as example how to make variable show as texture
Kills = 0;//variable that is updated

//function that sets text on the screen as texture
soldierXXXX_fnc_setKillsOnScreen = {
scriptName "soldierXXXX_fnc_setKillsOnScreen";
params [["_screen",objNull,[objNull]]];
private _text = format ["Total kills:%1 units",Kills];
private _texture = format ['#(rgb,512,512,3)text(0,0,"Caveat",0.08,"#0000007f","#FF0000",%1)',_text];
_screen setObjectTexture [0,_texture];
};

//Eventhandler that will update the screen everytime someone is killed
addMissionEventHandler ["EntityKilled", { 
 params ["_unit", "_killer", "_instigator", "_useEffects"];
Kills = Kills + 1;
[TV] call soldierXXXX_fnc_setKillsOnScreen; 
}];
  • Thanks 1

Share this post


Link to post
Share on other sites

@soldierXXXX thank you so much!  This will get me in the right direction and side note, thank goodness this is possible 😂

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

×