Sign in to follow this  
Followers 0
=]H[= Armigedon

AI Script Question

2 posts in this topic

Hey guys. First time setting up a server and adding mods. Is there a way to set AI actions based on combat state? 

EG: I want static/roving AI to allow players around them until the player initiates combat.

Share this post


Link to post
Share on other sites

if using Occupation for DMS then you can manipulate

Quote

SC_SurvivorsChance          = 10;                   // chance in % to spawn survivors instead of bandits (for places and land vehicles)
SC_occupyPlacesSurvivors = true;                 // true if you want a chance to spawn survivor AI as well as bandits (SC_occupyPlaces must be true to use this option)
SC_occupyVehicleSurvivors = false;                // true if you want a chance to spawn survivor AI as well as bandits (SC_occupyVehicle must be true to use this option)
SC_SurvivorsFriendly        = true;                 // true if you want survivors to be friendly to players (until they are attacked by players)
                                                    // false if you want survivors to be aggressive to players

You can use combat mode: https://community.bistudio.com/wiki/setCombatMode

combat mode green sets them to not fire unless fired upon: https://community.bistudio.com/wiki/ArmA:_AI_Combat_Modes

https://community.bistudio.com/wiki/setBehaviour

 

 

this is a custom call for AI I use sometimes in InfiSTAR:

Spoiler

fn_spawnAI = {
 _targetObj = _this;
 _netId = netId _targetObj;
 _stringcode = "
  _object = objectFromNetId "+str _netId+";
  _pos = getpos _object;
  _spawnPos = [_pos,20,20,20,0,0.5,0] call DMS_fnc_findSafePos;
  _group = [[_spawnPos select 0, _spawnPos select 1,0],6,'difficult','random','bandit'] call DMS_fnc_SpawnAIGroup;
  [_group, _pos] call bis_fnc_taskDefend;_group setBehaviour 'STEALTH';
  _group setCombatMode 'YELLOW';systemChat format['Spawn AI -> selected player: %1',name _object];
 ";
 [_stringcode] call admin_d0_server;
};

hope it helps

Share this post


Link to post
Share on other sites
Advertisement

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.