Jump to content

sabot10.5mm

Member
  • Content Count

    124
  • Joined

  • Last visited

  • Medals

Everything posted by sabot10.5mm

  1. firstly "weapon_AGM_65Launcher" are infrared-guided hence will not lock onto laser nor guide toward target. scalpel, dagr are the only vanilla laser guided missiles. possibly doTarget _laserTarget object
  2. sabot10.5mm

    Inconsistent loop timer

    as I said it was just an idea. I just tested it and it doesnt work as intended, 10000 iteration complete very fast
  3. sabot10.5mm

    Inconsistent loop timer

    A scheduled script has an execution time limit of 3 ms before being suspended to the benefit of another script until its turn comes back. here maybe to avoid suspension use a non-schedule? just an idea. _Timer SetVariable ["TimerTime", (time + 5)]; [...] call { _timer = _this select 0; while {true} do { if (time > (_timer getVariable ["TimerTime", -1])) exitwith {//misc stuff that doesnt run until timer is finished }; }; };
  4. once revealed maybe place a LaserTargetW on the pos of current target so ai have additional opportunities to fire missiles, bombs. never tried this but should work. hint macer missles are infrared. scalpel, dagr and GBU12 are laser guilded. _lasers = missionnamespace getvariable ["SAVEDLASERS",[]]; { _target = _x; _laser = "LaserTargetW" createVehicle position _target; _laser attachto [_target, [0,0,1]]; _lasers pushback [_laser,_target]; }foreach (allunits select {(side _x) == east}); missionnamespace setvariable ["SAVEDLASERS",_lasers]; //to delete { _laser=_x select 0; _unit=_x select 1; if(!alive _unit)then{deletevehicle _laser;}; }foreach _lasers
  5. allUnits apply {plane reveal [_x,4];}; go into editor spawn a plane and give it a name of plane, place SAD waypoint and spawn some troops. start the game and paste the code into debug. boom
  6. this script relieves all playable units, saves them to a variable and sorts by faction (cfgfactionclass >>displayName). my question is about navigating configfiles, most notably navigating and filtering configs. example say you want to filter out all of the unwanted "man" units like "range master", and "survivor" est. is there a more logical approach to this instead of saying is _unit in [array]? also saving units to variables to be used later. my approach looks weird anybody with the knowhow to guide me in the right direction _cfg = "getnumber( _x >> 'scope' ) isEqualTo 2" configClasses (configFile >> "Cfgvehicles"); for "_i" from 0 to ((count _cfg)-1) do { if (isClass ((_cfg select _i) )) then { _cfgNam = configName (_cfg select _i); _getside = getnumber (configfile >> "Cfgvehicles" >> _cfgNam>> "side"); _getfaction = gettext (configfile >> "Cfgvehicles" >> _cfgNam >> "faction"); _getfac = gettext (configfile >> "cfgfactionclasses" >> _getfaction>> "displayName"); _getSolClas = gettext (configfile >> "Cfgvehicles" >> _cfgNam>> "displayName"); _getvehcat = gettext (configfile >> "Cfgvehicles" >> _cfgNam>> "editorSubcategory"); hint str _getvehcat; if !(_getSolClas in ["Crewman","Officer","Competitor","Pilot","Helicopter Crew","UAV Operator","Survivor","Rifleman (Unarmed)","Assault Diver","Diver Team Leader","Diver Explosive Specialist"]) then { switch _getvehcat do { case ("EdSubcat_Personnel"): {call compile format["missionNamespace setvariable ['man_%1', (missionNamespace getVariable ['man_%1',[]]) + [_cfgNam]];", toupper _getfac];}; case ("EdSubcat_Cars"): {call compile format["missionNamespace setvariable ['car_%1', (missionNamespace getVariable ['car_%1',[]]) + [_cfgNam]];", toupper _getfac];}; case ("EdSubcat_APCs"): {call compile format["missionNamespace setvariable ['apc_%1', (missionNamespace getVariable ['apc_%1',[]]) + [_cfgNam]];", toupper _getfac];}; case ("EdSubcat_Tanks"): {call compile format["missionNamespace setvariable ['tank_%1', (missionNamespace getVariable ['tank_%1',[]]) + [_cfgNam]];", toupper _getfac];};}; }; };}; missionNamespace getVariable "man_NATO";
  7. sabot10.5mm

    navigating config files

    or just use if ("string" find "instring" > -1) then {};
  8. sabot10.5mm

    navigating config files

    my slow instring fnc Result: 0.0126 ms Cycles: 10000/10000 ["hi","1hi1"] call fn_instring; //returns true
  9. sabot10.5mm

    Enemy occupation system (eos)

    i don't have a server to test if it fully works. only thing i could test is artificialy increasing _Pcnt which seemed to work. And you are welcome. I'm ou-
  10. sabot10.5mm

    Enemy occupation system (eos)

    something like this
  11. sabot10.5mm

    Enemy occupation system (eos)

    This one? i added a call to a script to see if marker is bigger then 500m by 500m than enable dynamic simulation for each unit. i also switched out the fillhouse to a much better IMHO, each file must be replaced for it to work
  12. now I remember what I wanted to say. _delayedReveal = [_firer,_x,_distance,_travelTime,_revealValue] spawn { params ["_firer","_unit","_travelTime","_revealValue"]; take out (_distance). params is looking for 4 variables
  13. made a small change to JBOY UpDown script. added a logic statement that lockouts further while loops from exec if one is already running. then removes EH based on eventhandler index id for the unit
  14. sabot10.5mm

    Enemy occupation system (eos)

    enable dynamic simulation for markers more then 500m by 500m. I like this fillhouse script a little better
  15. sabot10.5mm

    List Box

    onLoad = "[] spawn {execVM 'listBox.sqf';};";
  16. sabot10.5mm

    What is Display #46?

    configfile >> "RscDisplayMission" access = 0; idd = 46; movingEnable = 0; onLoad = "[""onLoad"",_this,""RscDisplayMission"",'GUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay')"; onUnload = "[""onUnload"",_this,""RscDisplayMission"",'GUI'] call (uinamespace getvariable 'BIS_fnc_initDisplay')"; scriptName = "RscDisplayMission"; scriptPath = "GUI";
  17. sabot10.5mm

    What is Display #46?

    https://community.bistudio.com/wiki/findDisplay/Arma_3_IDD_list its the primary display ie mission display
  18. sabot10.5mm

    navigating config files

    ["CUP_O_T72_TKA"] call TAG_fnc_getTurretIndex; //[["Turret",[0]],["Turret",[0,0]],["CargoTurret",[1]],["CargoTurret",[2]],["CargoTurret",[3]],["CargoTurret",[4]],["CargoTurret",[5]],["CargoTurret",[6]],["Driver",[]]] ["B_T_Truck_01_transport_F"] call TAG_fnc_getTurretIndex; //[["CargoTurret",[0]],["CargoTurret",[1]],["Driver",[]],["Cargo",[0]],["Cargo",[1]],["Cargo",[2]],["Cargo",[3]],["Cargo",[4]],["Cargo",[5]],["Cargo",[6]],["Cargo",[7]],["Cargo",[8]],["Cargo",[9]],["Cargo",[10]],["Cargo",[11]],["Cargo",[12]],["Cargo",[13]],["Cargo",[14]]] ["B_MBT_01_cannon_f"] call TAG_fnc_getTurretIndex; //[["Turret",[0]],["Turret",[0,0]],["Driver",[]],["Cargo",[0]],["Cargo",[1]],["Cargo",[2]],["Cargo",[3]],["Cargo",[4]],["Cargo",[5]]] cargoturrets are considered turrets so use moveinturret. moveindriver, moveincargo for the respective array names.
  19. sabot10.5mm

    navigating config files

    _cfgVehicle = configfile >> "cfgvehicles" >> "B_MBT_01_cannon_F"; private _turrets = []; private _path = []; _fnc_getTurretindex = { params[ "_cfg" ]; for "_i" from 0 to count (_cfg >> "Turrets") -1 do { _cfg1 = (_cfg >> "Turrets") select _i; if !(getText( _cfg1 >> "proxyType" ) isEqualTo "CPCargo") then { _path append [_i]; _turrets pushBack ["turret",+_path]; }; _class = _cfg1 >> "turrets"; if (isClass _class) then { _cfg1 call _fnc_getTurretindex; _path deleteAt (count _path - 1); }; }; _turrets; };_cfgVehicle call _fnc_getTurretindex; made this with the intention to separate turrets, cargo and turretcargo. maybe even include turretcargo into the cargo array
  20. sabot10.5mm

    Enemy occupation system (eos)

    OpenMe.sqf this script gets all markers named "eos_marker", and changes the groupsize. unitsize, vehiclesize and cargosize based on the size of the marker; then it calls eos_spawn for each marker.
  21. sabot10.5mm

    Class attributes

    https://community.bistudio.com/wiki/Category:Arma_3:_New_Scripting_Commands_List
  22. sabot10.5mm

    navigating config files

    ah99 has weapons listed in the non dynamicloadout baseclass
  23. sabot10.5mm

    navigating config files

    test the nato helicopters. nato ah99 "turrets" is empty, weapons is in "mainturret" as for the recurse turrets part. what if i test isclass(_cfg1 >> "turrets") and call _fnc_turrets again?
  24. sabot10.5mm

    navigating config files

    TAG_fnc_getVehicleWeapons = { params[ "_vehicle" ]; _baseCfg = configFile >> "CfgVehicles" >> _vehicle >> "turrets"; _availableWeapons = []; _fnc_turrets = { params[ "_cfg" ]; for "_i" from 0 to count _cfg -1 do { _cfg1 = _cfg select _i; { _availableWeapons pushback _x; }forEach getArray (_cfg1 >> "weapons"); }; }; _baseCfg call _fnc_turrets; _availableWeapons; }; some reason it was only returning flares.. this works for me.
×