Jump to content
MechSlayer

RscTitles always shows the first image

Recommended Posts

I've got a problem, when I set a picture that's inside a RscTitles and I try to change the file (photo.paa) to another, it keeps showing the first one. It only changes if I change the name of the file.

.hpp

class RscTitles 
{
class RscProgress
{
    type = 8;
    style = 1;
    colorFrame[] = {0,0,0,1};
    colorBar[] = {1,1,1,1};
    texture = "#(argb,8,8,3)color(1,1,1,1)";
    w = 1;
    h = 0.03;
};

class HUD
{
	idd = 5000;
	movingEnable = 0;
	enableSimulation = 1;
	enableDisplay = 1;
	duration = 9999999999999;
	fadein = 0.1;
	fadeout = 2;
	name = "HUD";
	onLoad = "player setVariable ['stats', _this, true];";

	class controlsBackground
	{
		class Progress: RscProgress
        {
            idc = 1100;
			colorBar[] = {0.91,0.024,0.024,1};
           	x = 0.874062 * safezoneW + safezoneX;
			y = 0.71 * safezoneH + safezoneY;
			w = 0.02625 * safezoneW;
			h = 0.042 * safezoneH;
        };
	};
	class controls
	{
		class RscPicture_1200: RscPicture
		{
			idc = 1200;
			x = 0.834688 * safezoneW + safezoneX;
			y = 0.626 * safezoneH + safezoneY;
			w = 0.13125 * safezoneW;
			h = 0.42 * safezoneH;
			
		};
	};
};
};

.sqf

1 cutRsc ["HUD","PLAIN",-1,false];
	_display = (player getVariable "stats" select 0);
	_texto = _display displayCtrl 1100;
	_foto = _display displayCtrl 1200;
	_foto ctrlsetText "Fotos\persona.paa";
	while {true} do
	{
	_dano = damage player;
	_vida = 1 - _dano;
	_texto progressSetPosition _vida;
	sleep 0.5;
	};

 

Share this post


Link to post
Share on other sites

Sounds familiar. I remember changing the picture's file and the texture ingame staying the same too. I never knew the reason (maybe because the mission is cached?).

 

8 hours ago, sabot10.5mm said:

put ctrlSetText in a loop

Might work though I doubt it. For some reason arma needs to have the file's name changed before loading another picture.

 

Just letting you know that you are not the only one. Afaik the problem has been around for a long time now.

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

×