Jump to content

lifted86

Member
  • Content Count

    79
  • Joined

  • Last visited

  • Medals

Everything posted by lifted86

  1. just a quick look here, you missed a ; on the second last line just above hint "Done!"; and too create a unit, you need a center for its side or it wont spawn. you can use http://community.bistudio.com/wiki/createCenter in your init or put a unit of that side on the map with probablity of 0
  2. this might work while {true} do { if((cameraView == "EXTERNAL" || cameraView == "GROUP") && (vehicle player isKindOf "Helicopter)) then { vehicle player switchCamera "INTERNAL"; }; sleep 0.1; }; put this in the unit init _nvm = [] execVM "scripts/force_firstperson.sqf";
  3. something like this might work for you. There's probably a better way to do it, but this is pretty easy to setup. you will need 2 markers on the map for this to work "zone1" and "zone2" executed from unit init nul = [this] execVM "no_shooting.sqf"; no_shooting.sqf private ["_eh1","_inArea","_pos","_unit","_zone1","_zone2","_dis"]; _unit = _this select 0; _zone1 = getMarkerPos "zone1"; // marker name for the areas you want to protect _zone2 = getMarkerPos "zone2"; _dis = 200; // distance from area safe zone starts if ((_zone1 distance _unit > _dis) or (_zone2 distance _unit > _dis)) then { //check if unit is in zone when script starts _inArea = false; }else{ _inArea = true; _eh1 = _unit addEventHandler ["fired", {deleteVehicle (_this select 6);}]; }; while {true} do { if (((_zone1 distance _unit < _dis) or (_zone2 distance _unit < _dis)) && (!_inArea)) then { // check if unit enters _eh1 = _unit addEventHandler ["fired", {deleteVehicle (_this select 6);}]; _inArea = true; hint "safe zone"; }; if (((_zone1 distance _unit > _dis) or (_zone2 distance _unit > _dis)) && (_inArea)) then { // check if unit exits _unit removeEventHandler ["fired", _eh1]; _inArea = false; hint "You just left the safe zone"; }; sleep 5; };
  4. I'll have a shot at this for my first post ;) private ["_iedpos","_spd","_distance","_cond","_dis","_speed"]; _iedpos = _this select 0;// comes from a calling script _speed = [0.5,0.8,1] call BIS_fnc_selectRandom; _distance = [3,5,6,8,10] call BIS_fnc_selectRandom; _cond = false; { _dis = _x distance _iedpos; _spd = speed _x; if ((_dis <= _distance) && (_spd >= _speed)) exitWith {_cond = true;}; } forEach ESCORT_Units; if (_cond) then { //CODE HERE }; havent tested this, hope it helps
×