Jump to content

VulturARG

Member
  • Content Count

    13
  • Joined

  • Last visited

  • Medals

Community Reputation

3 Neutral

About VulturARG

  • Rank
    Private First Class
  1. Is there any way to use this in a windows server with TADST?
  2. I found this code in web a time ago. I made some little changes. // update marker as long as map is open (works for uav stations as well) J_myGPSEH = addMissionEventHandler ["Map", { params ["_mapIsOpened", "_mapIsForced"]; if (_mapIsOpened) then { ((uiNamespace getVariable "BIS_UAV_DISPLAY") displayCtrl 112410) mapCenterOnCamera true; //hint format["%1",mapGridPosition player]; _markerstr = createMarkerLocal ["markername",player]; _markerstr setMarkerShapeLocal "ICON"; _markerstr setMarkerTypeLocal "mil_start"; //_markerstr setMarkerTypeLocal "a3\ui_f\data\igui\cfg\islandmap\iconplayer_ca.paa"; _markerstr setMarkerDirLocal getDir player; switch (side player) do { case west:{ _markerstr setMarkerColorLocal "ColorWEST";}; case east:{ _markerstr setMarkerColorLocal "ColorEAST";}; case civ:{ _markerstr setMarkerColorLocal "ColorCIV";}; case Independent:{ _markerstr setMarkerColorLocal "colorIndependent";}; }; _markerstr setMarkerTextLocal format["%1",mapGridPosition player]; // no sheduled environment -> create one /* Triggered when map is opened or closed either by user action or script command openMap. */ /* [] spawn { waitUntil{ hint format["%1",mapGridPosition soldado]; }; };// */ } else{ hint ""; deleteMarkerLocal "markername"; } ; }]; This code work fine. They put an icon in map when I open it. The problem is that icon is static. If I moving in a vehicle always is in the my position at map open. Is there any way to actualizate the payer position when map is open? BTW: Where I can find the iconplayer_ca.paa? This line don't work _markerstr setMarkerTypeLocal "a3\ui_f\data\igui\cfg\islandmap\iconplayer_ca.paa";
  3. I'm sorry but I can't follow you. I'm just start to learn about scripts
  4. ok, to all. I hope that someone who has knowledge of MP comment about it.
  5. Thanks for everyone's response. I'm going to try this code. Where does this code go? In the initServer?
  6. Thank for your answer. But I'm looking for some solution that not depend of good will of player. Regards
  7. Hi guys, I'm interested in any way to hide the GPS screen when the player is aiming, like the compass or watch. Any idea? Regards,
  8. Here is my final code (for now) The logic is: Player is covered (setCaptive true) If player fire inside trigger area go to uncovered (setCaptive false) If not enemy close or player(s) kill enemies near him in a certain time, go to covered status again. (in the future) If player kill someone, is activated a radio check timer trigger, that do something Setup Made a group (or more) of infiltrate players. In the init of the group put this sentence: {_x setCaptive true;} forEach units this; (image) Make a trigger to cover the enemy area. Activate by player and you can use presense or detected by in activation type. In activation put this code nul = [] execVM "scripts\detectado.sqf"; Use your name and path. (image) Add this to initServer.sqf //initServer.sqf stealthStatus = "undetected"; publicVariable "stealthStatus"; Finally put this routine: //scripts\detectado.sqf player addEventHandler ["FiredMan",{ params ["_unit"]; player setCaptive false; //systemChat "Si escucharon ese disparo perdimos la cobertura"; [] spawn { _radiusPlayerDetected = ["RadiusDetected",100] call BIS_fnc_getParamValue; //Radio de detección _detectedTimeLimit = ["TimeToCallInContact",20] call BIS_fnc_getParamValue;//Tiempo de reacción _run = true; _timePlayerDetected = 0; _tiempo = 0; _playerDetected = false; _playerNotified = false; while {_run && (stealthStatus == "undetected")} do { //systemChat "_run"; if (alive player) then { _playerDetected = false; _listEntitiesNear = (getPos player) nearEntities _radiusPlayerDetected; _listEnemiesNear = _listEntitiesNear select {side _x == east}; { if ((_x knowsAbout player) > 1.4 && !(_playerDetected)) exitWith { _playerDetected = true; //systemChat "Algo sabe el enemigo"; }; } forEach _listEnemiesNear; _tiempo = diag_tickTime; call { if (_playerDetected && !(_playerNotified)) exitWith { _timePlayerDetected = diag_tickTime; //systemChat "Los enemigos sospechan que estamos cerca (>1.4)"; _playerNotified = true; }; if (_playerDetected && _playerNotified && (_tiempo >= _timePlayerDetected + _detectedTimeLimit)) exitWith { _run = false; //systemChat "Hemos sido descubiertos. Ya no estamos encubiertos"; player setCaptive false; stealthStatus = "detected"; publicVariable "stealthStatus"; }; if (!(_playerDetected) && _playerNotified) exitWith { _playerNotified = false; _timePlayerDetected = 0; //systemChat "Estamos seguros. No hay ningun enemigo cerca que sepa de nosotros"; player setCaptive true; }; }; } else { _run = false }; uiSleep 2; }; }; }]; You need to play with RadiusDetected and detectedTimeLimit values to adjust to requirements. Maybe 50 m and 30 sec. will be good for closed spaces. To adjust this parameter in game put this to description.ext //description.ext class Params { class EmtpyLine1 { title = ":: Parametros de Misión ::"; values[]={0,0}; texts[]={ "",""}; default = 0; }; class EmtpyLine2 { title = "..............................."; values[]={0,0}; texts[]={ "",""}; default = 0; }; class RadiusDetected { title = "Radio de detección de los enemigos"; values[] = {3,5,10,15,20,50,100,150,200,500,1000,1500,2000}; texts[] = {"3 metros","5 metros","10 metros","15 metros","20 metros","50 metros","100 metros","150 metros","200 metros","500 metros","1000 metros","1500 metros","2000 metros"}; default = 100; }; class TimeToCallInContact { title = "Tiempo que se tiene para recuperar la cobertura una vez detectados"; values[] = {5,10,15,20,25,30,45,60}; texts[] = {"5 segundos","10 segundos","15 segundos","20 segundos","25 segundos","30 segundos","45 segundos","60 segundos"}; default = 45; }; };
  9. Many many many thanks. Your code work fine. Spawn {} in an instruction that I do not finish to understand. I read the Bohemia wiki. I can't found cristal examples or I couldn't understand it 😌 I didn't know about uiSleep. There are some many commands 😉 Thanks again.
  10. Thanks for your answer. I'll check that. I tried to adapt my code and |TG189| Unkl code but I can't. I don't have enough knowledge for do that. First, I tried this way: _radiusPlayerDetected = ["RadiusDetected",100] call BIS_fnc_getParamValue; _detectedTimeLimit = ["TimeToCallInContact",20] call BIS_fnc_getParamValue; _run = false; _timePlayerDetected = 0; _tiempo = 0; _playerDetected = false; _playerNotified = false; _listEntitiesNear = []; _listEnemiesNear = []; player addEventHandler ["FiredMan",{ params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"]; systemChat "setCaptive false"; // Quita el encubrimiento solamente al jugador que dispara player setCaptive false; //////////////////////////////////////////////////////////////////////////////// _run = true; //////////////////////////////////////////////////////////////////////////////// }]; while {_run} do { systemChat "_run"; if (alive player) then { systemChat "alive player"; _playerDetected = false; _listEntitiesNear = []; _listEnemiesNear = []; _listEntitiesNear = (getPos player) nearEntities _radiusPlayerDetected; { if (side _x == east && alive _x) then { _listEnemiesNear pushBack _x; }; }forEach _listEntitiesNear; { if ((_x knowsAbout player) > 1.4 && !(_playerDetected) /*&& !(captive player)*/) then { _playerDetected = true; systemChat "_playerDetected"; }; }forEach _listEnemiesNear; if (_playerDetected && !(_playerNotified)) then { _timePlayerDetected = time; systemChat "Los enemigos saben de nosotros (>1.4)"; _playerNotified = true; }; _tiempo = time; if (_playerDetected && _playerNotified && (_tiempo >= _timePlayerDetected + _detectedTimeLimit)) then { _run = false; systemChat "Hemos sido descubiertos"; player setCaptive false; systemChat "setCaptive false"; }; /* if (!(_playerDetected) && (_tiempo < _timePlayerDetected + _detectedTimeLimit)) then { systemChat "No detectado en menos del tiempo limite"; // Regresa el estado de encubierto player setCaptive true; _run = false; }; */ if (!(_playerDetected) && _playerNotified) then { _playerNotified = false; _timePlayerDetected = 0; }; }; sleep 2; }; I couldn’t make work that. If I use the code without addEventHandler, it do the work but the player never go to setCaptive false status. I need a way that the setCapture status go to false after the player fire his weapon My next attempt was: player addEventHandler ["FiredMan",{ params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"]; systemChat "setCaptive false"; // Quita el encubrimiento solamente al jugador que dispara player setCaptive false; //////////////////////////////////////////////////////////////////////////////// _radiusPlayerDetected = ["RadiusDetected",100] call BIS_fnc_getParamValue; _detectedTimeLimit = ["TimeToCallInContact",20] call BIS_fnc_getParamValue; _run = true; _timePlayerDetected = 0; _tiempo = 0; _playerDetected = false; _playerNotified = false; _listEntitiesNear = []; _listEnemiesNear = []; while {_run} do { systemChat "_run"; if (alive player) then { systemChat "alive player"; _playerDetected = false; _listEntitiesNear = []; _listEnemiesNear = []; _listEntitiesNear = (getPos player) nearEntities _radiusPlayerDetected; { if (side _x == east && alive _x) then { _listEnemiesNear pushBack _x; }; }forEach _listEntitiesNear; { if ((_x knowsAbout player) > 1.4 && !(_playerDetected) /*&& !(captive player)*/) then { _playerDetected = true; systemChat "_playerDetected"; }; }forEach _listEnemiesNear; if (_playerDetected && !(_playerNotified)) then { _timePlayerDetected = time; systemChat "Los enemigos saben de nosotros (>1.4)"; _playerNotified = true; }; _tiempo = time; if (_playerDetected && _playerNotified && (_tiempo >= _timePlayerDetected + _detectedTimeLimit)) then { _run = false; systemChat "Hemos sido descubiertos"; player setCaptive false; systemChat "setCaptive false"; }; if (!(_playerDetected) && (_tiempo < _timePlayerDetected + _detectedTimeLimit)) then { systemChat "No detectado en menos del tiempo limite"; // Regresa el estado de encubierto player setCaptive true; _run = false; }; if (!(_playerDetected) && _playerNotified) then { _playerNotified = false; _timePlayerDetected = 0; }; }; //sleep 2; }; //////////////////////////////////////////////////////////////////////////////// }]; This seem work (I’m not sure) but I have a lot (really lot) of lag when I fired. Can you tell me some tip with this code?
  11. Thanks for your reply @pierremgi. I used your tip to made a search in google and I found a very interesting approach. This work make me to change the original idea. I imagine my new algorithm in this way. After fired any weapon setcapture is false and it check after some time (random between 20 and 40 seconds) if the enemy knows about player. If not, setcapture change to true. A second idea is that firing a weapon and kill some player start a countdown trigger. This trigger simulate that the enemy killed fail to answer a radio check. I'll search the way to put the enemy in alert when this trigger is activated. Do you know if the enemy detect if the player has the weapons down or in his back?
  12. Hi to all. I'm new in scripts programming and I have some doubts. I'm working in a cooperative MP mission. A unit is infiltrated behind enemy lines. They use enemy uniforms and weapons. This unit can't fire in enemy territory because they enemy discovery him, except if they use a suppressed pistol. I used this code: player addEventHandler ["FiredMan",{ params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_vehicle"]; if (_weapon != "rhsusf_weap_glock17g4") then { hint "setCaptive false"; // Only the player //player setCaptive false; // All unit are undercover {[_x,false] remoteExec ["setCaptive",_x]} forEach units group player; } else { hint "setCaptive true"; }; }]; This code works right, but any player with a suppressed pistol can kill all the enemy without any restriction First question: Is possible restraint the distance to kill the enemy or that the player and the enemy are un the same room or the enemy died in certain time after the player fire or any realistic situation that you can think, to avoid that? second question: I use a trigger with an area to discover my group if the enter in this area. This is not too real. If my group go into the area and kill the enemies one by one, and the enemies that behind the walls don't see or listen that, the group must remain uncovered. They must have a time before a guard can alert to others, and if the guard is killed before this, the unit is safe even though is inside the prohibit zone. Can you imagine some code to do this?
×