Soapbox0331
Member-
Content Count
64 -
Joined
-
Last visited
-
Medals
Everything posted by Soapbox0331
-
I may be asking too much of the ARMA AI here, but I wanted to run this by the experts here. I am still searching for a way to have Ai hunt players but avoid contact...like an AI anti-recon tracker keeping tabs on a recon team, both elements seriously trying to avoid contact. I have used the below code (from @opusfmspol) in the unit's 2nd waypoint, which works, and thinking easier to get the desired effect than BIS_fnc_stalk. I was hoping there was a way to modify this to do the following: 1) When AI is within 200m of nearest player, executes a MyScriptHere.sqf. 2) AI moves back to a waypoint 300m from the direction they came from (so if approached player from the south, move south). 3) Hold at that waypoint for 5 minutes and then start the hunt again. Any ideas? if (isServer) then { _null = this spawn { Hunt_players_fnc = { _player = objNull; _players = +(allPlayers - (entities "HeadlessClient_F")); _distance = 100000; { if (alive _x && _x distance (Leader _this) < _distance) then { _distance = _x distance (Leader _this); _player = _x; }; } foreach _players; if !(isNull _player) then { _wp = (Group _this) addWaypoint [getPos _player, (50 + (floor(random 100)))]; _wp setWaypointStatements ["true","_null = this spawn Hunt_players_fnc;"]; _wp setWaypointType "SAD"; _wp setWaypointCombatMode "GREEN"; _wp setWaypointSpeed "LIMITED"; }; }; _null = _this spawn Hunt_players_fnc; }; };
-
Modify Hunt_players_fnc
Soapbox0331 replied to Soapbox0331's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@jazzraill I am probably doing something wrong on this, but AI closes with me. -
Modify Hunt_players_fnc
Soapbox0331 replied to Soapbox0331's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Wow, thanks @jazzraill! I will check as soon as I can tonight. This is ok to run On Activation in 2nd waypoint as I have been doing with the prior version? -
Hello all. New to scripting and trying to baby-step my way through an event handler to get this: In MP/dedicated any player placing one of these two types of claymore mines from SOGPF ("vn_mine_m18_x3_ammo" OR "vn_mine_m18_x3_range_ammo"), a white phosphorus grenade ("vn_m34_grenade_mag") attaches to the placed mine object, and when claymore mine is triggered/detonated an additional detonation of "vn_m34_grenade_ammo" takes place at same location. I was thinking this starts with a player addEventHandler, maybe player addEventHandler "Fired", but looking at other EH types, wondering if it's better to use "Explosion" or even "Activate" (not sure if that is applying to mines). Any help/education is appreciated.
-
[SOLVED] help: addEventHandler for detonated claymore that adds additional grenade effect
Soapbox0331 replied to Soapbox0331's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@pierremgi Works like a charm! I'm a real fan of your MODs...thanks again! -
[TUTORIAL, PL/EN] SQF scripting for absolute beginners
Soapbox0331 replied to Rydygier's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@RydygierThanks for this, most helpful to me as a beginner to scripting. -
ai hunter script Herne The AI Hunter Script
Soapbox0331 replied to Gunter Severloh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Sorry, Hand to Hand combat...looks like the WebKnight's Zombies and Creatures uses the Improved Melee System. -
ai hunter script Herne The AI Hunter Script
Soapbox0331 replied to Gunter Severloh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am excited to use this script! @Gunter Severloh from your video, what MOD gets you the FIA Zombies and what HTH are you using? -
ai hunter script Herne The AI Hunter Script
Soapbox0331 replied to Gunter Severloh's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for these scripts. 1) Any issues using this on MP dedicated server? 2) Is there a way to keep the AI from closing with the players beyond a certain distance? For example consider AI recon element tasked to shadow players, so in tight terrain, for this example, not close to within say 150m of a player? -
Thanks @Maff, I actually have a test set up...will let you know how it goes.
- 10 replies
-
- 1
-
- eden editor
- ace
-
(and 2 more)
Tagged with:
-
Creating an ACE 3 unconscious player marker
Soapbox0331 replied to Rawshark's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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)? -
How should I be using removeItem in MP, dedicated?
- 10 replies
-
- eden editor
- ace
-
(and 2 more)
Tagged with:
-
addMissionEventHandler script Locality questions
Soapbox0331 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
addMissionEventHandler script Locality questions
Soapbox0331 replied to Soapbox0331's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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? -
addMissionEventHandler script Locality questions
Soapbox0331 replied to Soapbox0331's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks for the clarification @Harzach, that is very helpful...I was struggling with the role of init.sqf for MP. -
addMissionEventHandler script Locality questions
Soapbox0331 replied to Soapbox0331's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Thanks @Harzach Forget that it exists. What is appropriate for the init.sqf...if anything? -
How to select a script at random?
Soapbox0331 replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Ah, my apologies, didn't mean to commandeer the thread. Hopefully @Joe98 will post his code as well. -
How to select a script at random?
Soapbox0331 replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@Larrow Hey thanks for doing this, works great! Seeing what it went from, to your script, really helps my understanding. -
How to select a script at random?
Soapbox0331 replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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; -
How to select a script at random?
Soapbox0331 replied to Joe98's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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. -
How to use BIS_fnc_stalk?
Soapbox0331 replied to ChaIie's topic in ARMA 3 - MISSION EDITING & SCRIPTING
This is the error I am getting using it this way: "Error distance : Type Group, expected Array,Object,Location" -
How to use BIS_fnc_stalk?
Soapbox0331 replied to ChaIie's topic in ARMA 3 - MISSION EDITING & SCRIPTING
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? -
How to use BIS_fnc_stalk?
Soapbox0331 replied to ChaIie's topic in ARMA 3 - MISSION EDITING & SCRIPTING
Rather than having grpB eliminate grp1, how do I get grpB to return to base when within 200m of nearest player (using MP dedicated)? -
Jebus - Just Editor Based Unit Spawning
Soapbox0331 replied to dreadpirate's topic in ARMA 3 - MISSION EDITING & SCRIPTING
@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? -
Scripting presence condition based on a random number
Soapbox0331 replied to vissarion1917's topic in ARMA 3 - MISSION EDITING & SCRIPTING
That really works well! @sarogahtyp and @Harzach, thanks for showing me this new method...exactly what I needed!