Jump to content

Soapbox0331

Member
  • Content Count

    55
  • Joined

  • Last visited

  • Medals

Community Reputation

15 Good

About Soapbox0331

  • Rank
    Lance Corporal

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Soapbox0331

    Remove Item from Inventory

    Thanks @Maff, I actually have a test set up...will let you know how it goes.
  2. This is very helpful. Is there a way to make this available for unconscious BLUFOR (west) only? I think now it recognizes any unconscious. Also, does this work for for MP dedicated (running from initPlayerLocal.sqf)?
  3. Soapbox0331

    Remove Item from Inventory

    How should I be using removeItem in MP, dedicated?
  4. @Harzach Along this same line, would like to add the opportunity to place defective ammo on dead AI. I have an ammo can with this: [ this, "Draw bad ammo", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3", "_caller distance _target < 3", {player playMove "AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon";}, {}, {AmmoDrawn = true; publicVariable "AmmoDrawn"; hint "ammo drawn";}, {}, [], 2, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0]; BadAmmo.sqf: addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if ((faction _killed) == "CIV_f" || faction _killer isEqualTo faction _killed) exitWith {false}; [_killed, "Plant bad ammo", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "_this distance _target < 3 && AmmoDrawn", "_caller distance _target < 3 && AmmoDrawn", {player playMove "AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon";}, {}, {hint "ammo planted";}, {}, [], 2, 0, true, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, _killed]; }]; 1) If I have [] execVM "BadAmmo.sqf"; in initServer.sqf, does it run as soon as AmmoDrawn = true? Or am I running that script from the addAction on the ammo can? 2) Also to confirm, using the publicVariable "AmmoDrawn", new joins (JIP) will have this option once they join?
  5. Thanks for the clarification @Harzach, that is very helpful...I was struggling with the role of init.sqf for MP.
  6. Thanks @Harzach Forget that it exists. What is appropriate for the init.sqf...if anything?
  7. This is a great solution to random intel on AI from @wogz187 that is working for me in MP dedicated: missionNameSpace setVariable ["intel_hints", ["SMALL DIARY", "DOCUMENTS", "UNIT PATCH"]]; addMissionEventHandler ["EntityKilled", { params ["_killed", "_killer", "_instigator"]; if ((faction _killed) == "CIV_f" || faction _killer isEqualTo faction _killed) exitWith {false}; [_killed, "Search for intel", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "\a3\ui_f\data\IGUI\Cfg\holdactions\holdAction_connect_ca.paa", "!alive _target", "_caller distance _target <3", {_caller playMove "AinvPknlMstpSrasWrflDnon_Putdown_AmovPknlMstpSrasWrflDnon";}, {}, {params ["_target", "_caller", "_actionId", "_arguments"]; _target removeAction _actionID; []spawn { hint "Searching..."; sleep 1; if ((round random 10) > 7) then { hint selectRandom (missionNameSpace getVariable ["intel_hints", []]) } else { hint "Nothing found..." } } }, {}, [], 2, 0, false, false, false ] remoteExec ["BIS_fnc_holdActionAdd", 0, _killed]; }]; I am running it from init.sqf: [] execVM "randomIntel.sqf"; 1) There are multiple "Search for intel" entries on a single AI (looks like one per player). Does running this from initPlayerLocal correct that? 2) For JIP, does having a publicVariable in this script allow players joining late to see this addAction?
  8. Ah, my apologies, didn't mean to commandeer the thread. Hopefully @Joe98 will post his code as well.
  9. @Larrow Hey thanks for doing this, works great! Seeing what it went from, to your script, really helps my understanding.
  10. @Harzach I am sure you are right. Ok, intent is to create some variety to environment when players get to/spawn in their base/FOB. These are the "varieties" of flybys: AmbientFlyby_1.sqf: sleep 1; ambientFly = [getmarkerpos "FlyByStart", getMarkerPos "FlyByEnd", 120, "FULL", "uns_ov10_usaf_FAC", WEST] call BIS_fnc_ambientFlyBy; AmbientFlyby_2.sqf: sleep 1; ambientFly = [getmarkerpos "FlyByEnd_2", getMarkerPos "FlyByStart_2", 100, "FULL", "vn_b_air_uh1d_02_07", WEST] call BIS_fnc_ambientFlyBy; AmbientFlyby_3.sqf: sleep 1; ambientFly = [getmarkerpos "FlyByStart", getMarkerPos "FlyByEnd", 120, "FULL", "vn_i_air_ch34_02_02", WEST] call BIS_fnc_ambientFlyBy; sleep 2; ambientFly = [getmarkerpos "FlyByStart", getMarkerPos "FlyByEnd", 130, "FULL", "vn_i_air_ch34_02_02", WEST] call BIS_fnc_ambientFlyBy; AmbientFlyby_4.sqf: sleep 1; ambientFly = [getmarkerpos "FlyByStart_2", getMarkerPos "FlyByEnd_2", 200, "FULL", "uns_A1J_HCAS", WEST] call BIS_fnc_ambientFlyBy; sleep 3; ambientFly = [getmarkerpos "FlyByStart_2", getMarkerPos "FlyByEnd_2", 220, "FULL", "uns_A1J_HCAS", WEST] call BIS_fnc_ambientFlyBy;
  11. @Joe98 I have used same method...this is all in one script. In my case, called from a trigger. AmbientFlyby.sqf: _rNum = selectRandom [1,2,3,4]; if ( _rNum == 1 ) then { execVM "AmbientFlyby_1.sqf"; }; if ( _rNum == 2 ) then { execVM "AmbientFlyby_2.sqf"; }; if ( _rNum == 3 ) then { execVM "AmbientFlyby_3.sqf"; }; if ( _rNum == 4 ) then { execVM "AmbientFlyby_4.sqf"; }; Then subsequent AmbientFlyby scripts 1-4 are in the mission file.
  12. Soapbox0331

    How to use BIS_fnc_stalk?

    This is the error I am getting using it this way: "Error distance : Type Group, expected Array,Object,Location"
  13. Soapbox0331

    How to use BIS_fnc_stalk?

    Thanks @Play3r. Script (pretty sure I got this from someone in the BI community) I am using for spawning a group and having them stalk works (called from trigger, MP dedicated server): if !(isServer) exitWith {}; _spawnPoints = ["marker_LZ1"]; _unitsInGroup = ["vn_o_men_nva_65_16"]; _spawnMarker = _spawnpoints select (floor random (count _spawnpoints)); _unksSpawnPosition = getMarkerPos _spawnMarker; //[x,y,z] newGroup = createGroup [east,true]; _newLeader = "vn_o_men_nva_65_16" createUnit [_unksSpawnPosition,newGroup,"newLeader = this"]; sleep 1; { _newUnit = _x createUnit [_unksSpawnPosition,newGroup,"newUnit = this"]; sleep .4; }forEach _unitsInGroup; sleep 1; newGroup setBehaviour "STEALTH"; _stalk = [newGroup,group (allPlayers select 0), 300, 200, nil, nil] spawn BIS_fnc_stalk; The idea would be the stalkers get under 200m from players and move to CP marker simulating reporting what they found. I have tried a couple of variants but I don't think I have my mind around identifying the AI and nearest player (BLUFOR) for the purposes of using the "distance" method: _stalk = [newGroup,group (allPlayers select 0), 300, 200, {(something defining AI) distance (something identifying nearest player) < 200, "marker_CP"] spawn BIS_fnc_stalk; Any ideas?
  14. Soapbox0331

    How to use BIS_fnc_stalk?

    Rather than having grpB eliminate grp1, how do I get grpB to return to base when within 200m of nearest player (using MP dedicated)?
  15. @pognivetI feel the same...this is a go to script on everything I make. Can you give me an example of something you do with the "INIT=" parameter?
×