OFPEC Forum
Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: Iceman77 on 11 Jan 2013, 03:55:59
-
I would like to pass a string of text to a dialog class (or w/e its called). I see that 0 = ["some text"] createdialog "RscIceDialog" isn't even an option apparently.
Description.ext Snippet
class ICE_ObjDesc: RscText
{
idc = 1000;
text = "some text"; // Would like to be _this select 0
x = 0.40238 * safezoneW + safezoneX;
y = 0.430476 * safezoneH + safezoneY;
w = 0.191666 * safezoneW;
h = 0.0280952 * safezoneH;
};
-
I guess there's more elegant way of doing this but you could try if set/getVariable works :dunno:
missionNamespace setVariable ["myvaribname","string to the dialog"]
class ICE_ObjDesc: RscText
{
idc = 1000;
text = missionNamespace getVariable "myvaribname";
x = 0.40238 * safezoneW + safezoneX;
y = 0.430476 * safezoneH + safezoneY;
w = 0.191666 * safezoneW;
h = 0.0280952 * safezoneH;
};
Possible though that the text property actually expects a string instead of code.. :dunno:
-
createDialog "RceIceDialog";
((findDisplay YOUR_DLG_IDD) displayCtrl 1000) ctrlSetText (_this select 0);