Jump to content

SSgt 'Ice Cold' Sykes

Member
  • Content Count

    12
  • Joined

  • Last visited

  • Medals

Everything posted by SSgt 'Ice Cold' Sykes

  1. Hi, I'm trying to set up a minefield module via script. I get an error when using local variables while everything works fine with global variables. If anyone could tell why that'd be great. Here's my code : POP_fnc_Minefield = { if ((typename _this != "ARRAY") or (count _this < 3)) exitWith {hint format ["Error : POP_fnc_Minefield argument : %1", _this];}; _MineGroup = createGroup [(_this select 0), true]; _pos = _this select 1; _FieldSize = _this select 2; if (count _this <= 3) then {_NbMines = floor(_FieldSize/2);} else {_NbMines = floor(_FieldSize/2*(_this select 3));}; if (count _this <= 4) then {_MineType = "APERSMine";} else {_MineType = this select 4;}; if (count _this <= 5) then {_FieldCond = TRUE;} else {_FieldCond = _this select 5;}; _Minefield = "Site_Minefield" createUnit [ _pos, _MineGroup, format [ "this setVariable ['minescount', '%1']; this setVariable ['minestype', '%2']; this setVariable ['axisa', '%3']; this setVariable ['axisb', '%3']; this setVariable ['shape', 'Rectangle']; this setVariable ['side', 'Independent']; this setVariable ['marked', 'Friendlies']; this setVariable ['conditionofpresence', '%4'];", _NbMines, _MineType, _FieldSize, _FieldCond ] ]; }; This code throws undefined variable errors but if replace _NbMines, _MineType, _FieldCond with NbMines, MineType, FieldCond then everything seems to work fine.
  2. SSgt 'Ice Cold' Sykes

    Variable not defined when using local variable

    So this has been working just fine for me until now because it seems it isn't possible to create more than one minefield. The unit gets created but there are no mines and i can't find the source of the problem.
  3. SSgt 'Ice Cold' Sykes

    Loosing interface and controls after conncting to any drone

    From Xeno's changenote : Update: 20 May @ 12:51pm 3.93 - Fixed: When With AI is enabled do not delete UAV AI [...] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - So apparently this issue only appears when UAV AI is deleted while a player is controlling the UAV.
  4. I'm having this weird issue where, 20 seconds after connecting to any drone (be it UAV or UGV) i totally loose control of it as well as the interface and action menu wich. So i'm stuck watching an (often) burning wreck and can't do nothing but press escape and restart the mission. Now in MP i have been able to respawn but even then i can't move or look around. I can only shoot, throw grenades, reload and open the inventory. Also, when the drone is created (either assembled from a bag or spawned using createVehicle command) after the same time it disappears from the list of available Drones in the UAV terminal. This all happened to me in a modified (by me) version of Xeno's co40 Domination!. I'm sure the problem doesn't come from Xeno's code because i tried reproducing the bug in the original version of the mission and it didn't happen. However, in my mission it happens every time. Clearly the problem belongs somewhere in my code but i simply have no idea where and what to look for !
  5. SSgt 'Ice Cold' Sykes

    Loosing interface and controls after conncting to any drone

    Here is the mission file : https://1fichier.com/?z1owzbhhwi You can find everything i wrote/edited by searching for : POPINATOR Edit : Link no longer valid
  6. SSgt 'Ice Cold' Sykes

    Loosing interface and controls after conncting to any drone

    Well i was hoping something similar happened to someone or that you could give me a general idea of what to look for like what could cause the loss of control/the ui. If i were to share my code i'd simply won't know what to share because, as i said i have no idea what can cause this. I never touched anything related to drones so i really don't know where it comes from.
  7. Hi there, I have issues with my code coming from the fact that i don't really know of to use the configFile and everything that comes with it. I want to return all vehicles including those with "skins". So here is a part of the code i'm trying to use: _allClassNames = []; _Cfg = configFile >> "CfgVehicles"; for "_i" from 0 to (count _Cfg)-1 do { _class = _Cfg select _i; _className = configName _class; _allClassNames pushback _className; }; copyToClipBoard str _allClassNames; /* Extract of _allClassNames: "O_Heli_Transport_04_bench_F", "O_Heli_Transport_04_box_F", ---------------------------- Extract of a list of all class names : "O_Heli_Transport_04_bench_F", "O_Heli_Transport_04_bench_black_F", "O_Heli_Transport_04_box_F", */ I'm clearly missing some vehicles here. (Also how do i get the sqf highlighting when posting code on the forums ?)
  8. SSgt 'Ice Cold' Sykes

    How to get all vehicle classnames ?

    Oh nice. Thanks !
  9. SSgt 'Ice Cold' Sykes

    How to get all vehicle classnames ?

    I misspoke myself, i meant the "parameters" you can use after : "configFile >> 'CfgVehicles' >> _class >>" like 'displayName', 'vehicleClass', 'faction' and such
  10. SSgt 'Ice Cold' Sykes

    How to get all vehicle classnames ?

    Thanks it helped a lot ! Do you know where i can find a list of all things like : 'displayName', 'vehicleClass', 'textureSource', 'hardpoints' (idk what they're called) ?
  11. SSgt 'Ice Cold' Sykes

    How to get all vehicle classnames ?

    How do i make sure that the classnames returned don't have any subClasses in them ? Meaning from this : "B_Heli_Light_01_F", "B_Heli_Light_01_stripped_F", "Heli_Light_01_armed_base_F", "Heli_Light_01_dynamicLoadout_base_F", "B_Heli_Light_01_dynamicLoadout_F", "B_Heli_Light_01_armed_F" I would return : "B_Heli_Light_01_F", "B_Heli_Light_01_stripped_F", "B_Heli_Light_01_dynamicLoadout_F", "B_Heli_Light_01_armed_F"
  12. SSgt 'Ice Cold' Sykes

    How to get all vehicle classnames ?

    Thanks for your help ! Wasn't expecting some until at least next week, guess i should've come here sooner... Well i tried : _configs = "getNumber (_x >> 'scope') >= 2" configClasses (configFile >> "CfgVehicles"); _classNames = _configs apply {configName _x}; copyToClipBoard str _classNames; And i still can't find my "O_Heli_Transport_04_bench_black_F" in _classNames
×