Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Community Reputation

23 Excellent


About jakkob4682

  • Rank
    Staff Sergeant

Recent Profile Visitors

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

  1. So I have a function that creates a trigger dynamically, whats the best way to pass a local variable to the trigger? params ["_pos"]; _a = createTriggger ["EmptyDetector",_pos]; //settTriggerArea, activation, etc _buildings = nearestObjects [_pos,["House","Building"],350]; _building = _buildings select (count _buildings - 1); _bPos = getPosASL _builidng; how do I pass _bPos to a function within the triggerStatements?
  2. should I do this in the load waypoint or in a separate line?
  3. waitUntil{{_x in _veh} count units _grp == count units _grp}; _lz = (getPos player) findEmptyPosition [10,50,(typeOf _veh)]; hint format ["%1",str _lz]; _pad = "Land_HelipadEmpty_F" createVehicle _lz; _wp = _vGrp addWaypoint [_lz,50,1]; _wp setWaypointType "MOVE"; _wp setWaypointStatements ["true",""]; waitUntil{_veh distance _lz < 200}; {_x action ["eject",_veh]}forEach units _grp; {unassignVehicle _x}forEach units _grp; {[_x] orderGetIn false}forEach units _grp; _veh land "LAND"; this is working now, I abandoned the waypoint system
  4. No error in the .rpt but the waypoints aren't working for the infantry group thats spawned. If I go about it using assignAsCargo and orderGetIn it works fine but then I have an issue with the group not ejecting out of the vehicle. params ["_center","_radius"]; _LZArea = nearestLocations [_center,["FlatArea"],_radius]; _LZ_Zone = _LZArea select 0; _LZ_Pos = locationPosition _LZ_Zone; _LZ_Site = [_LZ_Pos,sideEmpty,(configfile >> "CfgGroups" >> "Empty" >> "Military" >> "HeliportsSmall" >> "SquareLZ")] call BIS_fnc_spawnGroup; _veh = "CUP_B_CH53E_USMC" createVehicle _LZ_Pos; createVehicleCrew _veh; _infGroups = [west,"CUP_B_USMC","Infantry_DES",[2,8]] call f_randomGrp; _infType = selectRandom _infGroups; _pos = (getPos _veh) findEmptyPosition [25,50,(typeof _veh)]; _grp = [_pos,west,(configFile>>"CfgGroups">>"WEST">>"CUP_B_USMC">>"Infantry_DES">>_infType)] call BIS_fnc_spawnGroup; _hWP = (group _veh) addWaypoint [getPos _veh,1,0]; _hWP setWaypointType "LOAD"; _hWp setWaypointStatements ["true",""]; _cargoWP = _grp addWaypoint [getPos _veh,10,0]; _cargoWP setWaypointType "GETIN"; _cargoWP setWaypointStatements ["true",""]; [(group _veh),0] synchronizeWaypoint [[_grp,0]]; [_veh,_grp] next function _qrf = [getPos player,3000] call f_spawnHeli; _veh = _qrf select 0; _grp = _qrf select 1; waitUntil{{_x in _veh} count units _grp == count units _grp}; _lz = (getPos player) findEmptyPosition [25,75,(typeOf _veh)]; _pad = "Land_HelipadEmpty_F" createVehicle _lz; _wp2 = (group _veh) addWaypoint [getPos _pad,25,1]; _wp2 setWaypointType "TR UNLOAD"; _wp2 setWaypointStatements ["true",""]; _wp1 = _grp addWaypoint [getPos _pad,10,1]; _wp1 setWaypointType "GETOUT"; _wp1 setWaypointStatements ["true",""]; [(group _veh),1] synchronizeWaypoint [[_grp,1]]; true again if I don't use the waypoint system and use assignAsCargo and orderGetIn and then use action "eject" in this function they don't eject
  5. jakkob4682

    Waypoint Question

    I want to be able to use the waypoint to find any enemies within the waypoint radius sort them by type and prioritize them by most dangerous/importance. i.e. attack heli moves to position when they reach the area it creates a list of enemy units within the waypoint radius sorted by order of danger/importance and targets them by priority.' i know theres probably already a function/script for this but I'm trying to create my own and want to understand how it's done.
  6. do waypoints operate in the same manner as triggers using list? i.e. can I use count thisList with a waypoint? Or do I need use a separate function to get enemy units within the waypoint radius?
  7. I have a three parent folders that contain a handful of functions, what's considered best practices for initializing each category of functions? i.e. I have an ambient functions folder that contains a few functions, I have a support folder with a few functions, and I have another folder that has misc functions. How do I go about initializing these? Should I put them all in one primary folder and then preprocess them from them that way? or preprocess separately?
  8. jakkob4682

    dynamic waypoints

    _f_randomLoc = { params ["_startingPos","_filter","_range"]; _array = nearestLocations [_startingPos,_filter,_range]; _randomLoc = selectRandom _array; _pos = locationPosition _randomLoc; _pos }; _a1 = []; _a2 = []; _a3 = []; _rPos1 = [getPos player,["nameVillage"],3000] call _f_randomLoc; _rPos2 = [_rPos1,["nameVillage"],1500] call _f_randomLoc; _rPos3 = [_rPos2,["nameVillage"],1500] call _f_randomLoc; {_a1 pushBack _x}forEach [_rPos1,_rPos2,_rPos3]; _hill1 = [_rPos3,["Hill"],3000] call _f_randomLoc; _hill2 = [_hill1,["Hill"],3000] call _f_randomLoc; {_a2 pushBack _x}forEach [_hill1,_hill2]; _Sp1 = [_hill2,["Hill"],3000] call _f_randomLoc; _Sp2 = [_Sp1,["Hill"],3000] call _f_randomLoc; {_a3 pushBack _x}forEach [_Sp1,_Sp2]; {_subset1 pushBack _x}forEach [_a1,_a2,_a3]; _checkpoints = []; _f_getCP = { params ["_pos","_range"]; _roads = _pos nearRoads 750; _road = selectRandom _roads; _cp = getPosASL _road; _cp }; _cp1 = [_rPos1,750] call _f_getCP; _cp2 = [_rPos2,750] call _f_getCP; _cp3 = [_rPos3,750] call _f_getCP; {_checkpoints pushBack _x}forEach [_cp1,_cp2,_cp3]; _f_addWP = { params ["_grp","_dest"]; _waypoints = waypoints _grp; _count = count _waypoints; _addWP = (_count + 1); _wp = _grp addWaypoint [_dest,250,_addWP]; _wp setWaypointCombatMode "YELLOW"; _wp setWaypointSpeed "Limited"; _wp setWaypointBehaviour "SAFE"; _wp setWaypointType "SAD"; _wp setWaypointTimeout [15,30,45]; _wp setWaypointStatements ["true",""]; _wp }; _patrolPos1 = selectRandom _a1; _patrolPos2 = selectRandom _a2; _patrolPos3 = selectRandom _a3; _patrolPos4 = selectRandom _checkpoints; _wpPool = [_patrolPos1,_patrolPos2,_patrolPos3,_patrolPos4]; _nGrp = [(selectRandom _wpPool),west,(configFile>>"CfgGroups">>"WEST">>"rhs_faction_usmc_d">>"Infantry">>_nInfType)] call BIS_fnc_spawnGroup; for "_i" from 1 to (count _wpPool) do { _wp = [_nGrp,(selectRandom _wpPool)] call _f_addWP; }; ??
  9. how would I add random waypoints from an array of positions so each one is random? Do I need to create each one separately or can I just use a for from loop?
  10. jakkob4682

    adding an action to an object

    Thank you this is exactly what I was looking for Yeah after reading Beno's response that's what I was looking for now to implement it!! Thanks guys.
  11. jakkob4682

    adding an action to an object

    I want to enable object interaction. As in opening a container/placing an object etc where you hold a button down to complete the action and after so long the action is completed. If that makes sense.
  12. not like using the addAction command but making an object interactive so for instance giving the ability to open a container/ plant a charge etc.
  13. Can you explain scheduled vs unscheduled please? Tried reading the biki on it but it lost me when it started getting into post/pre init. Again thank you
  14. yes this has helped a lot thank you. Trying to incorporate this into a system that sets variables so something like //setVariable command - _veh setVariable ["cargoSpace",_cargospace] where cargo space is available room in vehicle //setVariable for groups _grp setVariable ["ready",_inVehicle] //setVariable for in-transit _veh setVariable ["moving",true] how do I set a default value to params? params ["_height","_speed","_cMode"]; //if(isNil _this select 0)then{_this select 0 = 300}else{_this select 0 = _this}?