Jump to content

cybercoco

Member
  • Content Count

    176
  • Joined

  • Last visited

  • Medals

Posts posted by cybercoco


  1. Currently using this :

     

    text.sqf

     disableSerialization;
    
     1 cutRsc ["Jagger","PLAIN"];
    waitUntil {!isNull (uiNameSpace getVariable "Jagger")};
    	_display = uiNameSpace getVariable "Jagger";
    	_setText = _display displayCtrl 1001;
    	_setText ctrlSetStructuredText (parseText format ["Wonno"]);
    	// _setText ctrlSetBackgroundColor [0,1,1,0.5];
    

    dialogs.hpp

    class RscTitles
    {
        class Default 
           {
           idd = -1;
           fadein = 0;
           fadeout = 0;
           duration = 0;
             };
        class Jagger
        {
            idd = 1000000;
            movingEnable =  0;
            enableSimulation = 1;
            enableDisplay = 1;
            duration     =  99999;
            fadein       =  0.1;
            fadeout      =  2;
            name = "Jagger";
    		onLoad = "with uiNameSpace do { Jagger = _this select 0 }";
    	class controls 
            {
    		    class structuredText
                {
                    access = 0;
                    type = 13;
                    idc = 1001;
                    style = 0x00;
                    lineSpacing = 1;
    				x = 0.103165 * safezoneW + safezoneX;
    				y = 0.757996 * safezoneH + safezoneY;
    				w = 0.778208 * safezoneW;
    				h = 0.0660106 * safezoneH;
                    size = 0.020;
                    colorBackground[] = {0,0,0,0};
                    colorText[] = {1,1,1,1};
                    text = "";
                    font = "PuristaSemiBold";
    					class Attributes{
    						font = "PuristaSemiBold";
    						color = "#FFFFFF";
    						align = "CENTER";
    						valign = "top";
    						shadow = false;
    						shadowColor = "#000000";
    						underline = false;
    						size = "4";
    								}; 
                };
    		};
    	};
    };
    

    Any simpler way ?


  2. Final code :

    // script for trigger
    _trg = createTrigger ["EmptyDetector", getPos _won, false];
    _trg setTriggerArea [3, 3, 0, false];
    _trg setTriggerActivation ["WEST","PRESENT",true];
    _trg setVariable ["won", _won];
    
    _trg setTriggerStatements [    
                           "this &&  !(player in (thisTrigger getVariable 'won'))",
                           "(thisTrigger getVariable 'won') addaction [ '<t color=""#FF0000"">Hello</t>', 'staz\staz.sqf','',5]",
                           "removeallactions (thisTrigger getVariable 'won')"
                              ];
    

  3.  

    Modified your code :

    _won addAction [
                                    "<t color '#0000FF'>Hello</ t>",
                                    "staz\staz.sqf",
                                    _won,
                                    1,
                                    "",
                                    "",
                                    "",
                                    "(player distance _won) < 3"
                                ];

    This doesn't display the addAction, while approaching the car.


  4. family1 = _unit addAction ["<t color='#9A2EFE'>- </t><t color='#FF0000'>M</t><t color='#FFFFFF'>u</t><t color='#0000FF'>r</t><t color='#FF0000'>i</t><t color='#FFFFFF'>c</t><t color='#0000FF'>a</t> <t color='#FF0000'>A</t><t color='#FFFFFF'>i</t><t color='#0000FF'>r</t><t color='#FF0000'>l</t><t color='#FFFFFF'>i</t><t color='#0000FF'>n</t><t color='#FF0000'>e</t><t color='#FFFFFF'>s</t>", "flyingDestroyerT1.sqf"];
    

    In player's init, _unit is a local variable in global space...


  5. yes it is related to the number of post. The rest are military ranks. There are special occasions when special people have special titles. ;)

    nothing to really worry about

     

    You Sir, seem special :D "Poly Bully". Congratulations for RHS !


  6.  Larrow, is that an addaction with a condition ? Seems like a good idea...

     

     

    Can you not just use the action? Otherwise every time the trigger is activated there will be a new action on the car.

    _won = createVehicle [_type, _position, [], 0, "NONE"];
    _won addAction [ "<t color '#0000FF'>Hello</ t>", "staz\staz.sqf", [], 1, true, true, "",
        "_this distance _target < 3 && side _this isEqualTo west && !( _this in _target )"
    ]; 

    I didn't mention something in the first post, the deactivation is not :

    "hint 'no civilian near wonno'"
    

    but

    "removeallactions (thisTrigger getVariable 'won')"
    

    Basically each time the player gets in the vehicle or out of the 3 meters area, the addaction ealier added will be gone.


  7. The issue must be in your "staz.sqf" then, because it works for me.

     

    And btw, you don't need to use format if you don't put anything (like numbers or so) into the string.

     

    I don't think the file linked makes any differences because it's not yet run.

    Ok, do I just write this ?

    "(thisTrigger getVariable 'won') addaction ['<t color='#0000FF'>Hello</t>', 'staz\staz.sqf','',5]",
    

  8. A local variable is local to the code it is defined in. The scope of the local variable is the script/function/code. It does not exist outside that scope. A global variable exists in every scope on the client/entity it was created:

     

    car.sqf > _won only exists in car.sqf. 

     

    car.sqf > won exists in all scripts/code on the client it was defined on.

     

    Thanks Whiztler for clarifying.


  9. I am now trying to get over the issue of quotation marks...

    Instead of "hint 'yes yes yes'" on activation I would like an addaction with text format inside.

     

    Tried the code bellow and it works.

    "(thisTrigger getVariable 'won') addaction [ format ['<t>Hello<t>'], 'staz\staz.sqf']"
    

    However once I am trying to change the text's color, this bellow doesn't work.

    "(thisTrigger getVariable 'won') addaction [ format ['<t color '#0000FF'>Hello<t>'], 'staz\staz.sqf']",
    
×