Jump to content

kocrachon

Member
  • Content Count

    936
  • Joined

  • Last visited

  • Medals

Posts posted by kocrachon


  1. 5 minutes ago, pierremgi said:

    What concerns laptop1 stays with laptop1...

     

    laptop1 addAction ["Hack Terminal", {

      params ["_target", "_caller", "_Id"];

      _caller playmove "some_animation";

      sleep 5;

      removeAction _Id;

      hint "Laptop1 has been hacked";

    }];

     

    Or, with one in all script:
     

    
    {
      _x addAction ["Hack Terminal", {
        params ["_target", "_caller", "_Id","_params"];
        _caller playmove "some_animation";
        sleep 5;
        _target removeAction _Id;
        _nbr = _params #0;
        hint ("Laptop "+str(_nbr)+ " has been hacked");
      },[_forEachIndex +1] ];
    } forEach [laptop1,laptop2,laptop3];

     

     

     

    Ok, I am still confused. Because this does not change the boolean value of my variable does it? Or am I missing something?


    The point of the boolean variable (terminal_1_hacked = false/true) is because I have a trigger places that once all three variables switch from false to true, it triggers a new event. That is why I am trying to figure out how to convert a global variable from false to true, so that it can set off another trigger elsewhere. 


  2. Here is what you set me

     

    Quote

    laptop1 addAction ["Hack Terminal", {terminal_1_hacked = true}] ;  should be fine.

     

    But the problem for me, with this, is it does not run a script for me. I don't want it to go instantly to true. I want it to switch to true at the end of the script because I want a player animation that looks like the player is using the terminal to run before its "hacked". So is there a way for the script to run and then change the variable? And the reason I was passing it as a parameter is so I could use the same script for all 3 terminals the player has to hack. Is there a way around this?

     

    This is also used for online, does that change it at all?


  3. 12 minutes ago, pierremgi said:

    On the other hand, it's not like you'd clearly explain what is your purpose... You spoke about a bunch of global variables like terminal_1_hacked which don't need to be passed as 3rd parameter of the addAction. And your two lines:

    _trigger = _parameters select 1;

    _trigger = true;

    are just useless.

     

    I attached my entire script and I explained the premise above.

     

    I have a boolean variable set to false. 

     

    Quote

    terminal_1_hacked = false;

     

    I then went to pass it, as a variable, into my .sqf script via addaction parameter, to change the boolean value after the rest of the script runs, because I have a total of 3 matching variables, and once all three of them switch from false to true, a trigger will set off.  How else can I have a script execute and run, and then change the global variable from within the script without writing within the script the global variable? Because then I would need to write some if statement "if paramter == hacked_terminal then do this, else do this, else do this"


  4. 9 minutes ago, pierremgi said:

    You should write what you intend to do. At this time, your addaction is weird. What is the need to pass as param some global variables like  a string "1" or terminal_1_hacked..??

    Then your _trigger is also non understandable.

     

    laptop1 addAction ["Hack Terminal", {terminal_1_hacked = true}] ;  should be fine.

     

    Theres more going on because I want to play animation so I can have a sleep before the termina_1_hacked = true.

     

    Here is what I have as a rough draft so far.

    Quote

     

    _laptop = _this select 0;
    _unit = _this select 1;
    _action = _this select 2;
    _parameters = _this select 3;

     

     

     

    _unit playmove "some_animation";

    sleep 5;

     

    removeAllActions _laptop;


    hint format ["Laptop %1 has been hacked", _parameters  select 0]; //test until I change it later

     

    _trigger = _parameters select 1;

    _trigger = true;

     

     

    Essentially, I don't want the trigger variable to switch from FALSE till TRUE until the animation and everything has been completed.


  5. Hey All,


    Right now I have a series of variables that are booleans. terminal_1_hacked = false, terminal_2_hacked = false, etc etc. 

     

    With that, I am creating a script to addaction. 

     

    Quote

    laptop1_action = laptop1 addAction ["Hack Terminal", "hack_terminal.sqf", ["1", terminal_1_hacked]] 

     

    I want to make it so when the script gets it, it changes it to true, but it doesn't seem to work.

     

    Quote

     

    _parameters = _this select 3;

    _trigger = _parameters select 1;

    _trigger = true;

     


    However, this doesn't seem to work as intended, and I sort of see why, but I am not sure how to pass the variable to the script, and making sure I only change terminal_1_hacker when passed as a variable, rather than building a series of if statement to see which of the variables it is. 


  6. No error, the loader just, freezes.

     

    Here is a sample end of an RPT when it starts to hang.

     

    Quote

    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_AIDamageThreshold, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_enableUnconsciousnessAI, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_remoteControlledAI, _value=true z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_preventInstaDeath, _value=true z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_bleedingCoefficient, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_painCoefficient, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_medical_keepLocalSettingsSynced, _value=true z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_advanced_fatigue_enabled, _value=false z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_advanced_fatigue_performanceFactor, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_advanced_fatigue_recoveryFactor, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_advanced_fatigue_loadFactor, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) TRACE: 81375 setSettingMission from module: _settingName=ace_advanced_fatigue_terrainGradientFactor, _value=1 z\ace\addons\common\functions\fnc_readSettingFromModule.sqf:49
    18:49:41 [ACE] (common) INFO: Settings initialized.
    18:49:41 [ACE] (common) INFO: 119 delayed functions running.

     


  7. Hey All,

     

    This is a script I used for a stealth mission where "sleeping" enemies were considered civilians until they woke up and armed themselves. The script worked about 6 months ago, but as of today, it stopped working. When I disable the script on the units that had it, my mission loads, so there is something specific in this script that is freezing my loading now, and wondering if anyone has any ideas.

     

    Here is me launching it in the unit.

    _nul = [this] execVM "testing.sqf"

    I have it running on only 10 units. 

    _unit = _this select 0;
    
    _knows = False;
    _knowsabout = 0;
    _active = False;
    
    
    if (captive _unit) then {
    	_EHkilledIdx = _unit addEventHandler ["killed", "execVM 'civilian_killed.sqf'"]
    };
    
    while {!_knows} do {{
    
    if ((side _unit) == East AND (_unit knowsabout _x) > 3.5)
    	then
    		{
    		_active = True; 
    		_knows = true;
    		}
    
    } foreach units squad1;
    
    
    {if ((_unit knowsabout _x) > 3.5 AND (captive _unit) AND (_unit distance _x) <= 3)
    	then
    		{
    		_unit setcaptive false; 
    		_active = True; 
    		_knows = True; 
    		_unit removeEventHandler ["killed", 0];
    		_unit switchmove "AidlPercMstpSrasWrflDnon_AI";
    		sleep 1;
    		_unit enableai "ANIM";
    		_unit enableai "TARGET";
    		};
    
    } foreach units squad1;
    
    };
    
    if (_active) then {
    	sleep 5;
    	if (alive _unit) then {alarm = True}
    
    };

    Civilians killed is also on civlians,  but here it is, just in case.

     

    if (isServer) then {
    civilian_count = civilian_count + 1;
    officer1 sidechat "Stop killing civilians!";
    }

     


  8. Hey All,

     

    I am not sure how to work around this.

     

    I noticed that your units on the US side all have a specific pair of NVGs in their inventory, even when I clear out the inventory, they end up there. When a night time mission starts, they are auto placed into the slot it looks like. So this prohibits me from equipping other NVGs onto RHS units, because when the mission starts, they get over written by the RHS NVGs.

     

    Is there a way around this? So far, I have to place the NVGs I want into the inventory, and ask the players to switch... My other workaround has been to use BIS default units and put them in RHS gear, and this solves the problem. 


  9. Hey All,

     

    I am running into this issue where I am placing, in the Arsenal, a very specific pair of NGVs on my RHS US Unit. Specifically, I am trying to use the ACE Gen 4 NVGs, but when I spawn into a nighttime mission, RHS seems to auto replace them with the RHS AN/PVS 15.

     

    This seems like something fairly new since I last played. And I have a bunch of missions I would rather not have to entirely redo my unit placement/gearing up, because of this. So I am hoping there is some way to prevent it from doing this. I checked addon settings and I don't see anything for RHS to disable this.

     

    EDIT: Confirmed it only happens with RHS units, so seems to be RHS mod specific. 


  10. Hey Pook,

     

    Loving the pack. Been great for some of my missions.

     

    First, how do I go about making my own site? When I place my own HAWK, Radar, EWR, control station, etc, they dont seem to track. Is placing a "site" require or is there a way to make my own?

     

    Second, I am running into an error whenever a HAWK site shoots, I seem to get this popup.

     

    D7C7933268FEC875392047D0F41E3D0C1F88CB8A


  11. 2 hours ago, pierremgi said:

    setBehaviour

    So my original version had it spelled right, and corrected it, but issue persists. 

     

    {if (side _x == EAST) then {_x setcaptive true; (group _x) setBehaviour "CARELESS"}} foreach allunits

     

    EDIT:

     

    If I do just this, it works for all units, so the if part of the statement might not be working right? Am I not declaring side properly?

     

    {_x setcaptive true; (group _x) setBehaviour "CARELESS"} foreach allunits


  12. Hey All,

     

    Super simple I am hoping, I am trying to make it so that all units on side EAST are captive and passive. Once an event triggers, they go not captive and COMBAT. But my string does not seem to work.

     

    {if (side _x == EAST) then {_x setcaptive true; (group _x) setBehaviour "CARELESS"}} foreach allunits

     

    I get no errors, but if I walk infront of a redfor, they shoot at me. So not sure where I am wrong on this. I assume its somewhere around the group part but I havent been able to resolve it so far. 


  13. On 6/15/2017 at 1:29 AM, pierremgi said:

    You can have an idea of how the BI module works, looking at arma3\addons folder then open the modules_F.pbo  (with pbo manager or else) then open cas_bombing.FSM (with FSM editor which is a BI tools). You'll see the script chart. Roughly, the coordinates of objective are used to:

    - create a laser target (in case of non guided request!);

    - add a waypoint "destroy" attached to this target.

    After a delay the waypoint is "SAD"

    If a shot (EH fired) a waypoint "move" is added to initial position with a land "land" (in case of this could work!)

     

    An update on how I got around it.

     

    The module allows you to give an 'init' the the spawned aircraft of virtual aircraft module. So I added EH Fired to remove all weapons, disable AI, set to careless, and delete the vehicle after 45 seconds (usually it has flown away by then). So, that is a work around for now. 


  14. 3 minutes ago, pierremgi said:

    Nothing wrong except the poor BI support modules. Not a priority.

     

    I mean, it is pretty disapointing. I make shifted my own version where it uses eventhandlers fired to disable the planes ability to find and send it into passive, and then come when radioed and become active again, not sure why BIS seems to struggle doing the same, or what the support module even does really.


  15. As the title says. I am using the new F/A-181, I am connecting it to the Support Requester CAS (Bombing Run). When I call it in for a laser designated bomb run, it drops the bomb and says 'RTB'. But, if I keep the laser going, the plane will keep circling around and dropping its bombs. I know I can use the virtual to avoid this, but I like having an actual fighter loitering.

     

    If I set a waypoint to do not fire, it will circle around the laser and not fire.

     

    So am I doing something wrong? How do I get it to actually ignore the laser after its dropped a bomb for its call. 

×