Jump to content

Lorenz94

Member
  • Content Count

    168
  • Joined

  • Last visited

  • Medals

Posts posted by Lorenz94


  1. Hello,

    I've configured my dedicated server with a secondary IP under its NIC.

    I can start the Server by using the -ip parameter inside my server's .cfg file (eg -ip=123.456.789.0). The server starts, I can find it and play in it with no problems at all, and it has the set ip.

     

    The problem is that I can't have my headless client (local to the dedicated) to connect to the server.

     

    Without the use of a defined IP with the -ip parameter, I used to set
     

    localClient[]={"127.0.0.1"};
    headlessClients[]={"127.0.0.1"};

    and my headless clients had -connect=127.0.0.1 / -connect=localhost as parameters.


    With the new IP, for example the said "123.456.789.0", HCs can't connect even if I tried what follows:

    //server .cfg
    -ip=123.456.789.0
    
    //server config.cfg
    localClient[]={"127.0.0.1","123.456.789.0"};
    headlessClients[]={"127.0.0.1","123.456.789.0"};
    
    //headless params
    -connect=123.456.789.0

    Do someone how to achieve the headless client connection with a defined IP on the server?

    thank you.


  2. Hello! Can you please add a settings that allows to manually choose whether to show the medic icon on the radar if a player has the ace attribute or is of the medic classname? Let me better explain: now if a player has some sort of ace medical level, DUI automatically shows it on the radar as a medic. What I would like to do is to have the medic icon displayed only if a player is of a medic class (such as "B_medic_F" for example). This because me and my friends like to have "ace advanced diagnose" on for everyone (numeric values for heart rate and pressure), and to achieve this thing we need to set all our avatars to medic, restricting some actions such as stitching to doctors.

     

    Please let me know if I explained or not! Thank you.

    • Like 1

  3. Thank you for your replies. The snippet it's just pseudo-code, not the actual set of functions of course, I simply summarized the steps I took in a very list-like manner to show the logic behind the process. 

     

    @POLPOX - The same function is used to spawn normal and simple objects, so that's why there's also enableSimulationGlobal. You're right about being pointless on simple objects!

    @pierremgi - But if I'm spawning them on [0,0,0] before actually moving them to their final position, why do those simple object remain on their initial positions? The final position is the result of findSafePos. If the position format is wrong, shouldn't those simple object just disappear under the terrain or spawn at incorrect heights? That's what I can't understand!

    Thanks!


  4. ?? The topic is nothing near to your reply, sorry to say!

    The snippet shows how I create simple objects and the question is how to avoid simple objects created via script not being set at their position! The problem is not about gameplay logic, I'm *not* asking how to setup a mission to be played. The problem is only related to a single simple object placement, that seems, at least with my flow, to not work as expected.


  5. Hello,
    I'm having issues on spawning Simple and Super-Simple objects at a given position. I tried to troubleshoot the thing, but I can't find out what's wrong.

     

    I'm spawning custom compositions at random positions. Normal objects spawn well, but simple objects "get lost" near [0,0,0]. If all objects get spawned as normal (so using createVehicle, not createSimpleObject), no issues at all.

    What's going on:

    Spoiler
    
    //Position relative to composition' center, retrieved from a loop of all objects
    private _position = getArray (_x >> "positionInfo" >> "position");
    private _position = [_position select 0, _position select 2, _position select 1];
    
    ///// ///// ///// /////
    
    //Tried both, same result
    
    //Simple object creation
    private _object = createSimpleObject ["myClassName", [0,0,10000]];
    _object enableSimulationGlobal false;
    
    //Or
    
    //Super Simple objects creation
    private _data = ["myClassName"] call BIS_fnc_simpleObjectData;
    private _object = [_data, [0,0,10000], 0, false, true] call BIS_fnc_createSimpleObject;
    
    _object enableSimulationGlobal false;
    
    ///// ///// ///// /////
    
    //Later on, once found the position
    _object setPosWorld _myObjectPos;
    
    private _pos = getPosWorld _object;
    _pos set [2, getTerrainHeightASL _pos];
    _object setPosWorld _pos;
    
    _object setDir _myDir;
    
    _object enableSimulationGlobal true;

     

    Any idea on what can be wrong? Thank you!

     

    EDIT: The snippet is intended to show how I retrieve an object' position from the sqe file, the code I tried to spawn the said object as "simple" and how I position it on the map. The positioning works with not-simple objects, while keeps simple objects near the spawn position (as you can see, [0,0,10000]). So I started this topic to kindly ask if anyone has got a similar experience and how to deal with simple objects creation. Thanks.


  6. Hello,
    I would like to add a custom button to the zeus/curator interface that disappears and reappears whenever backspace is pressed.

     

    Can someone please help me in hooking the interface? About the button creation no problem.

    Example code for the button

    Spoiler
    
    _display = findDisplay 312;
    
     _btn = _display ctrlCreate ["ctrlStaticPicture", -1];
     _btn ctrlSetPosition [0.85 * safezoneW + safezoneX, 0.15 * safezoneH + safezoneY, 0.062 * safezoneW, 0.020 * safezoneH];
     _btn ctrlSetText "#(rgb,8,8,3)color(0,0,0,0.675)";
     _btn ctrlCommit 0;

     

    Thank you!


  7. 2 hours ago, Harzach said:

    It's a boolean that sets either rectangle or ellipse.

     

    Clipped from my test code:

    
    _pos = [player, 100, 1000, 2, 0, 0, 0, [[markerPos "blacklist", 250, 500, 45, false]], []] call BIS_fnc_findSafePos; 

    I placed an objective marker named "blacklist." The parameters above create a 250x500 ellipse turned 45 degrees. Note that the blacklist entry is in double brackets as it is meant to be an array of arrays (a collection of positions).

    Thank you Harzach,

    please see what happens if I use the *suggested* syntax ([center, [a, b, angle, rect]]), so a square bracket in addition:

    Spoiler
    
    {
      if ("test_" in _x) then {
        deleteMarker _x;
      };  
    } forEach allMapMarkers;
    
    for "_i" from 1 to 10000 do {
      _pos = [player, 100, 500, 2, 0, 0, 0, [[markerPos "blacklist", [250, 500, 45, false]]], []] call BIS_fnc_findSafePos;
    
      _rnd = createmarker [format ["test_%1", _pos], _pos];
      _rnd setMarkerType "mil_dot";
      _rnd setMarkerColor "ColorGreen";
    };

     


    same code, with a larger radius: result


  8. Hello,

    I'm trying to find n positions around a center using the command "BIS_fnc_findSafePos" and I would like to know if someone has ever successfully utilized the "advanced" blacklist settings, here in the spoiler:

    Spoiler

    blacklistPos (Optional): List of blacklisted areas in format [area1, area2, area3... areaN] (Default: []). Area could be one of:

    Array - in format [topLeftCorner, bottomRightCorner] - top and bottom coordinates of blacklisted area

    Object - trigger area

    String - marker area

    Location - location

    Array - array in format [center, distance] or [center, [a, b, angle, rect]] or [center, [a, b, angle, rect, height]]


    In particular, my interest is in blacklisting "slices" of the circle around a center. Can this be accomplished by using "[center, [a, b, angle, rect]]" as params? I tried some run of the code inside a loop, but I can't understand what these parameters do, first of all what does "rect" exactly means. If there's a way to set up triangle-shaped zones to be blacklisted it would be fine.

     

    Thank you!


  9. 7 hours ago, 7erra said:
    
    _rscUnitInfo = uiNamespace getVariable "RscUnitInfo";
    _ctrlPos = ctrlPosition (_rscUnitInfo displayCtrl 113);
    
    _ctrlPos params ["_xP", "_yP", "_wP", "_hP"];
    
    _ctrl = _rscUnitInfo ctrlCreate ["RscStructuredText", 200401];
    _ctrl ctrlSetTextColor [0,0,0,1];
    _ctrl ctrlSetStructuredText parseText format  ["<t align='center' size='0.45' shadow='0'>%1%2</t>", ((fuel vehicle player)*100) toFixed 0, "%"];
    _ctrl ctrlSetPosition [_xP, _yP - _hP/2, _wP, 2 * _hP];
    _ctrl ctrlCommit 0;

     

    The magic here is the Structured Text. The attribute "center" aligns the text.

    Some other notes:

    1. You can use the display itself to display the value. When exiting the vehicle it is reset and doesn't show up anymore.
    2. Use the RscStructuredText base class. When chaning the ui size it scales the text size correctly.
    3. ctrlSetTextColor for more contrast on white background
    4. You can play around with the 'size' parameter to find something that suits you
    5. vehicle command instead of objectParent seems a bit more intuitive but doesnt matter
    6. GUI positions are a bit complicated. You were using absolute values which will stay the same while the ui changes depending on UI size, screen size, ...

     

    The only problem that remains is that RscUnitInfo closes as soon as you leave the vehicle. Calling it everytime the player enters a vehicle is a possible solutin with a getin EH.

    Thank you 7erra, this works as I intended. I can't see the difference between my coordinates and yours, where can understand you're not using  absolute values? Thank you!


  10. Hello, I'm trying to add a text line showing a real time percentage over the fuel bar.

    What I'm facing is a problem in centering the text on the full lenght of the bar, based on how many numbers do have the text (eg: 1%, 10%, 100%).

     

    Can someone more confident with default dialogs please help? What I have is as follows, and works, but not centered:

    Spoiler
    
    _rscUnitInfo = uiNamespace getVariable "RscUnitInfo";
    _ctrlPos = ctrlPosition (_rscUnitInfo displayCtrl 113);
    
    _ctrlPos params ["_x", "_y", "_w", "_h"];
    
    _ctrl = findDisplay 46 ctrlCreate ["ctrlStructuredText", 200401];
    _ctrl ctrlSetFont "PuristaSemibold";
    _ctrl ctrlSetText format ["%1%2", ((fuel objectParent player)*100) toFixed 0, "%"];
    _ctrl ctrlSetPosition [_x +0.125, _y - _h, _w, _h +0.1];
    _ctrl ctrlCommit 0;

     

    Thank you!


  11. Hello and thank you for all your replies!
     

    19 hours ago, pierremgi said:

    Did you have any report file?

    Will post a pastebin this evening (UTC+2)!
     

    4 hours ago, Dedmen said:

    Well any crash caused by a script is a Arma bug. Did you already report it to the feedback tracker? with the report file?

    https://feedback.bistudio.com/w/ft_a3_howto/gamecrash/

    Never thought about this, will do some more testing before bothering!

     

    3 hours ago, killzone_kid said:

    I wouldn’t go as far as to say "any". One can write pretty stupid stuff resulting in crash, there is no way of stopping that

    Seems logic to my noob coding experience, but in this particular case I think I've done all correct.. the only thing I run at respawn is the snipped I provided 😓

    Thank you again, will update soon.


  12. 1 hour ago, pierremgi said:

    [_player]] call CBA_fnc_waitUntilAndExecute;

    At least, there is a typo. Then, what for?

    Hello pierremgi,

    I modified the formatting a bit, so to be less confusing, my fault! There's no typo in there, the second closing bracket closes the argument calling for the function!

    What I can't understand is why it causes crashes only is connected to a dedicated, while the server just prompts "player disconnected".

     

    Thank you.


  13. Hello,

    I'm experiencing a client crash at respawn and I can't really understand why. I've done some troubleshooting and I know for sure the portion of code that causes the crash, but can someone please help me in understanding why?

     

    Explanation:

    I need to check if an unconscious player do respawn with a medic nearby.

     

    Spoiler

    Server:

    Spoiler
    
    
    //called at mission start
    
    "respawnCounter" addPublicVariableEventHandler {
      params ["_var", "_params"];
      _params params ["_uid"];
    
      _protocol = //here I retrive the protocol ID;
      _respawns = "extDB3" callExtension format ["0:%1:doUpdateRespawn:%2", _protocol, _uid];
    };

     

    Client:

    Spoiler
    
    
    //called at mission start
    
    player addEventHandler ["Respawn", {
      params ["_unit"];
    
      _pos = getPosATL _unit;
      _isUnconscious = _unit getVariable ["goneUnconscious", 0];
    
      if (_isUnconscious > 0) then {
        if !(_pos nearEntities ["B_medic_F", 4] isEqualTo []) then {
    
          respawnCounter = [getPlayerUID _unit];
          publicVariableServer "respawnCounter";
        };
      };
    
      _unit setVariable ["goneUnconscious", 0];
      [] call BRZ_fnc_handleUnconscious;
    }];

    BRZ_fnc_handleUnconscious:

    
    
    //called at mission start, re-called from inside the respawn EH
    
    [{
      params ["_player"];
      _player getVariable "ACE_isUnconscious" isEqualTo true;
    },
    {
      params ["_player"];
      _player setVariable ["goneUnconscious", 1];
    }, [player]] call CBA_fnc_waitUntilAndExecute;

     

     

     

    - The above code works as expected if tried locally;

    - The extDB3 callExtension works if tried alone on the server;

     

    What seems to cause the crash is the BRZ_fnc_handleUnconscious. If I don't call for that code, the crash simply does not happen.

     

    The RPT file is not very helpful: simply reports ACCESS VIOLATION, as stated by the crash dialog.

     

    Why do a "quick" variable change cause a crash?

     

    Thank you.

×