Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×

Hendo

Member
  • Content Count

    10
  • Joined

  • Last visited

  • Medals

Community Reputation

1 Neutral

About Hendo

  • Rank
    Private
  1. heya, You also have a space between the .sqf and the " in the composition call, should be this _newComp = [(getPos this), (getDir this), "SmallBase_EP1"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf")); not _newComp = [(getPos this), (getDir this), "SmallBase_EP1"] call (compile (preprocessFileLineNumbers "ca\modules\dyno\data\scripts\objectMapper.sqf ")); cya
  2. Hiya, You could try this script for your alarm that I made under a different handle many moons ago http://www.armaholic.com/page.php?id=9179 For a change in behavior try this. ////////////////////////////////////////////////////////////////// // Function file for [ARMA2/Combined Ops] // Created by: Hendo // in a trigger place this in the onact // hen = [(thislist select 0)]execVM "setbehaviour.sqf"; ////////////////////////////////////////////////////////////////// _caller = _this select 0; _seek_type = "MAN"; _check_radius=30; _seeker_unit = [getPosASL _caller select 0,getPosASL _caller select 1,0] nearObjects [_seek_type,_check_radius]; { /* "BLUE" (Never fire) "GREEN" (Hold fire - defend only) "WHITE" (Hold fire, engage at will) "YELLOW" (Fire at will) "RED" (Fire at will, engage at will) */ _x setCombatMode "BLUE"; /* "CARELESS" "SAFE" "AWARE" "COMBAT" "STEALTH". */ _x setBehaviour "STEALTH"; }forEach _seeker_unit; //DEBUG SCRIPT ==> hint "This has exited"; Here is the Wiki link to the Definition on SetBehavior http://community.bistudio.com/wiki/setBehaviour GoodLuck Edit: fixed code to include all units within radius
  3. You may have to remove weapons from the AI in your team, to stop them engaging the enemy before they get inside the base though, then re-add their weapons when they dismount with getin and getout Eventhandlers. http://community.bistudio.com/wiki/ArmA_2:_Event_Handlers I had this issue once not sure if it still happens, been a few years. Goodluck
  4. Hiya mate, Check out this thread about eventhandlers Damage and hit it will solve your problems. http://forums.bistudio.com/showthread.php?134872-How-to-increase-a-unit-vehicle-s-health-to-200-or-more&highlight=eventhandler+damage Cya
  5. Hey how are you going, Here is a cool IED script that has units randomly place IED's, you can have as many as you like spread around the map, Just read the header to understand it's usage. // --------------------------------------------------------------------------------------------------------- // BAF IED Script // Author: Nielsen // Credit: // kylania @ bisforums for describing how to use the BAF IEDs. // shk @ bisforums for helping me debug the script (and several others). // Please feel free to modify or distribute this code as you see fit. Any recognition will be appreciated. // --------------------------------------------------------------------------------------------------------- // USAGE: // Place this script in your mission directory. Place an ai in the editor AND NAME HIM. // It is important to name him, what you name him is not important. // In the init line put: // ied = [this,"type","size","side"] execVM "BAF_iedScript.sqf"; // The ai will set an ied of the chosen type, move of a certain random distance and hide. // When the chosen side are within 10m of the IED, if still alive the ai will detonate it. // // Required parameters: // unit = Unit to set the IED (i.e. this). // type = Type of IED set. Options are "garbage", "ground" and "random". // size = Size of the IED. Options are "small", "big" and "random". // side = Side that will make the IED explode. Options are "west", "east", "civ" and "guer". // // Init line examples: // ied = [this,"garbage","big","WEST"] execVM "iedScript.sqf"; // ied = [this,"random","small","CIV"] execVM "iedScript.sqf"; // ied = [this,"random","random","EAST"] execVM "iedScript.sqf"; // --------------------------------------------------------------------------------------------------------- if !(isServer) exitWith {}; private ["_ai","_ied","_iedSize","_randomIED","_position","_hidePos"]; _ai = _this select 0; _ied = _this select 1; _iedSize = _this select 2; _randomIED = floor (random 2); _position = getPos _ai; //Set IED type private ["_iedType"]; switch (_ied) do { case "garbage": { switch (_iedSize) do { case "small": { _iedType = "BAF_ied_v1"; }; case "big": { _iedType = "BAF_ied_v2"; }; case "random": { if (_randomIED == 0) then { _iedType = "BAF_ied_v3"; }; if (_randomIED == 1) then { _iedType = "BAF_ied_v4"; }; }; }; _hidePos = [(getpos vehicle _ai select 0) + ( 50 + ((random(50)))*sin(getdir vehicle _ai - 180)), (getpos vehicle _ai select 1) + ( 50 + ((random(50)))*cos(getdir vehicle _ai - 180))]; }; case "ground": { switch (_iedSize) do { case "small": { _iedType = "BAF_ied_v3"; }; case "big": { _iedType = "BAF_ied_v4"; }; case "random": { if (_randomIED == 0) then { _iedType = "BAF_ied_v3"; }; if (_randomIED == 1) then { _iedType = "BAF_ied_v4"; }; }; }; _hidePos = [(getpos vehicle _ai select 0) + ( 100 + ((random(100)))*sin(getdir vehicle _ai - 180)), (getpos vehicle _ai select 1) + ( 100 + ((random(100)))*cos(getdir vehicle _ai - 180))]; }; case "random": { switch (_iedSize) do { case "small": { if (_randomIED == 0) then { _iedType = "BAF_ied_v1"; }; if (_randomIED == 1) then { _iedType = "BAF_ied_v3"; }; }; case "big": { if (_randomIED == 0) then { _iedType = "BAF_ied_v2"; }; if (_randomIED == 1) then { _iedType = "BAF_ied_v4"; }; }; case "random": { private ["_randomType"]; _randomType = round random 3; switch (_randomType) do { case 0: { _iedType = "BAF_ied_v1"; }; case 1: { _iedType = "BAF_ied_v2"; }; case 2: { _iedType = "BAF_ied_v3"; }; case 3: { _iedType = "BAF_ied_v4"; }; }; }; }; _hidePos = [(getpos vehicle _ai select 0) + ( 50 + ((random(150)))*sin(getdir vehicle _ai - 180)), (getpos vehicle _ai select 1) + ( 50 + ((random(150)))*cos(getdir vehicle _ai - 180))]; }; }; //set IED muzzle private ["_iedMuzzle"]; _iedMuzzle = format ["%1_muzzle",_iedType]; //Debug //diag_log format ["iedType: %1 - IedMuzzle: %2",_iedType,_iedMuzzle]; //Add and set IED removeAllWeapons _ai; _ai addMagazine format ["%1",_iedType]; _ai playmove "amovpercmstpsraswrfldnon_gear"; _ai Fire format ["%1",_iedMuzzle]; //Create proximity trigger private ["_tgtSide"]; _tgtSide = _this select 3; IEDtrigger = createTrigger["EmptyDetector", position _ai]; IEDtrigger setTriggerActivation [format["%1",_tgtSide], "PRESENT", false]; IEDtrigger setTriggerArea [5, 5, 45, false]; IEDtrigger setTriggerStatements ["this",format["%1 action [""TOUCHOFF"",%1]",_ai],""]; //Run and hide _ai doMove _hidePos; sleep 10; _ai setBehaviour "STEALTH"; Hope that is a start for you.
  6. Heya mate, Glad that it worked for you 300 = 300 seconds sleep will only work with counting seconds.
  7. G'day, One way would be to do it like this :- In your init place squad_timeout = True; Publicvariable "squad_timeout"; In your trigger condition field put squad_timeout and in your script put this at the start if (!(squad_timeout)) exitwith {hint "You must wait for 5 minutes before you can call a new squad";}; squad_timeout = False; Publicvariable "squad_timeout"; and this at the end of your script after your spawn code sleep 300; squad_timeout = True; Publicvariable "squad_timeout"; Forgive any errors not at my Arma machine at the moment, but that should do the trick mate. Cheers Hendo
  8. If that is the case place your move waypoint directly on top of the unit you wish the way point to follow, it will update every couple of seconds and your waypoint will follow that guy.
  9. Hi there, Generaly you sync a waypoint with a trigger By dragging a dark blue Sync line (use F5 or manualy select syncronize on right hand side of the editor window) between the trigger and Waypoint you want to use. Eg. A trigger with "East" "not present" syncronized to a move waypoint. The Unit wont move past the synced waypoint until the Condition of the trigger is met (unless self preservation kicks in ;) ). Hope that helps
  10. Hey how are you all doing, I am kinda new to this, but this may work aswell. In the triggers condition put this line this && "LAND" countType thisList > 0 This should work the same as the above post by Panther but with land vehicle check instead. Cheers
×