Oliver0l 10 Posted October 30, 2014 Hey guys, I'm new in the scripting scene. ;) I made new missions for my Server. If the player need to re-read what they have to do, they should be able to see a dialog. So I created a new Dialog. class auftrag { idd = 99998; movingEnable = false; enableSimulation = true; class controlsBackground { class background: RscText { idc = 1001; x = 0.164844 * safezoneW + safezoneX; y = 0.148 * safezoneH + safezoneY; w = 0.696094 * safezoneW; h = 0.759 * safezoneH; colorBackground[] = {0,0,0,0.4}; }; class autor: RscText { idc = 1006; text = "by [iBG] Clan"; //--- ToDo: Localize; x = 0.752656 * safezoneW + safezoneX; y = 0.885 * safezoneH + safezoneY; w = 0.108281 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {0,0,0,0.6}; }; }; class controls { class Title_Background: RscText { idc = 1000; text = "Bornholm Life: Aufträge"; //--- ToDo: Localize; x = 0.165 * safezoneW + safezoneX; y = 0.1209 * safezoneH + safezoneY; w = 0.696094 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class af_1: RscText { idc = 1002; text = "Aufträge"; //--- ToDo: Localize; x = 0.206094 * safezoneW + safezoneX; y = 0.203 * safezoneH + safezoneY; w = 0.531094 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class auf1: RscText { idc = 1007; text = "Auftrag 1"; //--- ToDo: Localize; x = 0.283437 * safezoneW + safezoneX; y = 0.289 * safezoneH + safezoneY; w = 0.422812 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class auf2: RscText { idc = 1008; text = "Auftrag 2"; //--- ToDo: Localize; x = 0.283437 * safezoneW + safezoneX; y = 0.46567 * safezoneH + safezoneY; w = 0.422812 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class auf3: RscText { idc = 1009; text = "Auftrag 3"; //--- ToDo: Localize; x = 0.283437 * safezoneW + safezoneX; y = 0.6192 * safezoneH + safezoneY; w = 0.422812 * safezoneW; h = 0.022 * safezoneH; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class aff_1: RscText { idc = 1003; text = "--leer--"; //--- ToDo: Localize; x = 0.283437 * safezoneW + safezoneX; y = 0.313 * safezoneH + safezoneY; w = 0.422812 * safezoneW; h = 0.132 * safezoneH; colorBackground[] = {0,0,0,0.6}; }; class RscText_1004: RscText { idc = 1004; text = "--leer--"; //--- ToDo: Localize; x = 0.283437 * safezoneW + safezoneX; y = 0.489 * safezoneH + safezoneY; w = 0.422812 * safezoneW; h = 0.121 * safezoneH; colorBackground[] = {0,0,0,0.6}; }; class RscText_1005: RscText { idc = 1005; text = "--leer--"; //--- ToDo: Localize; x = 0.283437 * safezoneW + safezoneX; y = 0.643 * safezoneH + safezoneY; w = 0.422812 * safezoneW; h = 0.132 * safezoneH; colorBackground[] = {0,0,0,0.6}; }; class close: RscButtonMenu { idc = 2400; text = $STR_global_close; x = 0.164844 * safezoneW + safezoneX; y = 0.913 * safezoneH + safezoneY; w = 0.0515625 * safezoneW; h = 0.022 * safezoneH; tooltip = "Klicken Sie hier, um die Aufträge zu schließen."; action = "closeDialog 0;"; }; class delete_1: RscButtonMenu { idc = 2401; text = "löschen"; //--- ToDo: Localize; x = 0.644375 * safezoneW + safezoneX; y = 0.423 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.022 * safezoneH; tooltip = "Auftrag löschen"; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class delete_2: RscButtonMenu { idc = 2402; text = "löschen"; //--- ToDo: Localize; x = 0.644375 * safezoneW + safezoneX; y = 0.588 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.022 * safezoneH; tooltip = "Auftrag löschen"; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; class delete_3: RscButtonMenu { idc = 2403; text = "löschen"; //--- ToDo: Localize; x = 0.644375 * safezoneW + safezoneX; y = 0.753 * safezoneH + safezoneY; w = 0.061875 * safezoneW; h = 0.022 * safezoneH; tooltip = "Auftrag löschen"; colorBackground[] = {"(profilenamespace getvariable ['GUI_BCG_RGB_R',0.3843])", "(profilenamespace getvariable ['GUI_BCG_RGB_G',0.7019])", "(profilenamespace getvariable ['GUI_BCG_RGB_B',0.8862])", "(profilenamespace getvariable ['GUI_BCG_RGB_A',0.7])"}; }; }; }; If they became a new mission, the manual must be in the dialog. But I don't know hoc I can do that. Here's a little mission start: _unit = _this select 0; _action = _this select 2; ((findDisplay 99998) displayctrl 1003) ctrlSetText "Hallo, ich brauche Medizin für einen verletzten Soldaten. Hast du welche? Mein Freund wohnt außerhalb. Ich gib dir seine Position. Er müsste sich in Gudhjem herumtreiben."; hintC "Hallo, ich brauche Medizin für einen verletzten Soldaten. Hast du welche? Mein Freund wohnt außerhalb. Ich gib dir seine Position. Er müsste sich in Gudhjem herumtreiben."; _unit removeAction _action; //[]execVM "core\jobs\TextChange.sqf"; sleep 10; But the Code "((findDisplay 99998) displayctrl 1003) ctrlSetText........" doesn't work. Anybody know how I can solve my problem. Do not be surprised about the language, I'm from Germany :D Oliver0l Share this post Link to post Share on other sites
LifriBjorson 10 Posted November 3, 2014 What do you mean by "But the Code "((findDisplay 99998) displayctrl 1003) ctrlSetText........" doesn't work." ? Did you check the rpt file for any errors ? Where do you create your dialog ? From where do you call the SQF file ? Share this post Link to post Share on other sites
iceman77 19 Posted November 3, 2014 You need to make sure the dialog exists after you create it. Before you do anything else. //_d = createDialog "auftrag"; _unit = _this select 0; _action = _this select 2; waitUntil {!(isNull (findDisplay 99998))}; ((findDisplay 99998) displayctrl 1003) ctrlSetText "Hallo, ich brauche Medizin für einen verletzten Soldaten. Hast du welche? Mein Freund wohnt außerhalb. Ich gib dir seine Position. Er müsste sich in Gudhjem herumtreiben."; // ... Share this post Link to post Share on other sites