Jump to content

Fiddi

Member
  • Content Count

    241
  • Joined

  • Last visited

  • Medals

Everything posted by Fiddi

  1. Yes, since I don't want anything else to happen if it's empty then it works perfectly. Thanks for the help, everyone!
  2. Oh, so it is so simple as to just do isEqualTo {} Don't know why I didn't try it the first time. Though, what is more performance friendly, simply calling an empty code {} or checking if it's empty and then calling it or not? EDIT: Tested it with the debug console's performance tool. It's faster (and cleaner) just to call the empty code, about 0.0005 ms faster
  3. I can confirm! Also, the killed eventhandler doesn't trigger when unit is killed by water.
  4. Hello, I'm trying to make a NATO Ifrit, problem is that the smoke launchers and some communication equipment doesn't seem to be tied to the default textures, so I would like to know how to change color on those specific items, only for the ifrit. Here's a picture of said problem:
  5. Yes, I noticed the changelog. It looks great now, the previously miscolored parts are fine now. Very fast work! PS. A little thing but I liked that you used 'communications equipment' in the changelog! :D
  6. Oh, okay, let's hope you don't break anything then :D Thanks for the clarification!
  7. I used the existing NATO turret texture since it is already the color I want. And there's no problem with the turret, it is the correct color, might have been a better idea to take the picture with the HMG version instead, but the problem remains on each version.
  8. Hey, do anyone have a template for the To-199 Neophron? EDIT: Nevermind, made one myself, not perfect but it works. https://drive.google.com/open?id=0Bx8A1AbbWy4AS3ZIbTlDSEJMRkE
  9. Fiddi

    Virtual Arsenal Patches

    I have this in config.cpp and it shows up: class CfgUnitInsignia { class Forsvarsmakten { displayName = "Försvarsmakten"; author = "Fredrik"; texture = "\Super_Mod\Insignia\Forsvarsmakten.paa"; }; }; And to see insignias inside virtual arsenal you must call it with ["AmmoboxInit",[this,true]] call BIS_fnc_arsenal; Might be there the problem lies.
  10. Hey, I would like some help regarding finding a position under water. I want to spawn in the big submarine, and since I'd like it to be at a random location I need to find a position that fills certain requirements. It needs to be underwater so maybe start at 50-100m depth. I've tried selectBestPlaces, that seems to have a waterDepth setting but I can't figure out how to use it, the other is BIS_fnc_findSafePos, but that doesn't have a parameter for depth.
  11. Tried it now, dropped a helicopter in the water, it respawned perfectly. EDIT: Seems to be the impact of the water that destroys the helicopter therefore fires the eventhandler, but if simply put in the water then it doesn't work. Can I add an engine eventhandler, with an If to check whether or not is it underwater and/or deleted? EDIT 2: Then again, the respawn module doesn't respawn the vehicle when put in the water either.
  12. Hello, I'm split between two methods of vehicle respawning, they are both functions through libraries and are as follows. Method 1: (While loop) if (!isServer) exitWith {}; private["_name", "_position", "_direction", "_type"]; params [ ["_vehicle", objNull, [objNull]], ["_delay", 10, [0]], ["_init", "", [""]], ["_loadout", "", [""]] ]; _name = vehicleVarName _vehicle; _position = getPosASL _vehicle; _direction = getDir _vehicle; _type = typeOf _vehicle; if (count _loadout > 0) then {[_vehicle, _loadout] call FRED_fnc_vehicleLoadout}; while {true} do { Sleep 5; if (!(alive _vehicle)) exitWith { Sleep (_delay + 0.1); if (_Vehicle distance _position < 100) then {deleteVehicle _vehicle}; Sleep 0.2; _newVehicle = _type createVehicle _position; _newVehicle setPosASL _position; _newVehicle setDir _direction; if (!isNil "_name") then { [_newVehicle, _name] remoteExec ["setVehicleVarName", 0, true]; }; if (count _init > 0) then { _newVehicle call compile format ["%1", _init]; }; [_newVehicle, _delay, _init, _loadout] remoteExec ["FRED_fnc_vehicleRespawn", 2]; }; }; Method 2: (Eventhandler) if (!isServer) exitWith {}; private["_name", "_position", "_direction", "_type"]; params [ ["_vehicle", objNull, [objNull]], ["_delay", 10, [0]], ["_init", "", [""]], ["_loadout", "", [""]] ]; _vehicle setVariable ["Delay", _delay, true]; _vehicle setVariable ["Init", _init, true]; _vehicle setVariable ["Loadout", _loadout, true]; _vehicle setVariable ["Name", vehicleVarName _vehicle, true]; _vehicle setVariable ["Position", getPosASL _vehicle, true]; _vehicle setVariable ["Direction", getDir _vehicle, true]; _vehicle setVariable ["Type", typeOf _vehicle, true]; if (count _loadout > 0) then {[_vehicle, _loadout] call FRED_fnc_vehicleLoadout}; _vehicle addEventHandler ["killed", { (_this select 0) spawn { _vehicle = _this; _delay = _this getVariable "Delay"; _init = _this getVariable "Init"; _loadout = _this getVariable "Loadout"; _name = _this getVariable "Name"; _position = _this getVariable "Position"; _direction = _this getVariable "Direction"; _type = _this getVariable "Type"; Sleep (_delay + 0.1); if (_vehicle distance _position < 100) then {deleteVehicle _vehicle}; Sleep 0.2; _newVehicle = _type createVehicle _position; _newVehicle setPosASL _position; _newVehicle setDir _direction; if (!isNil "_name") then { [_newVehicle, _name] remoteExec ["setVehicleVarName", 0, true]; }; if (count _init > 0) then { _newVehicle call compile format ["%1", _init]; }; [_newVehicle, _delay, _init, _loadout] remoteExec ["FRED_fnc_vehicleRespawn", 2]; }; }];
  13. Don't know about subcategories but you can just add another normal category.
  14. Have you ever built an elevated rig out on the ocean? That's the problem, as far as the game's concerned they are in the air.
  15. Okay, still, the whole reason I made my own method was that helicopters spawned 10m above the position with engines on and immediately crashed to the ground, or platform in my case. @mdcclxxvi When deleted the vehicle didn't respawn in any of the methods, and that would happen so rarely I don't mind. How about "entityKilled"? Is that the same or is it possibly better? Does it even mean roughly the same thing as "killed"? And yeah, this is about as good as I can come up with, so that other method you mentioned might be beyond my knowledge.
  16. Hey, when aiming up with an RCO on the Zafir while the bipod is up and you have a Titan Compact on your back causes the titan to clip through your head and blocks your view completely.
  17. Does the respawn module support loadouts, init and name? And does it still put vehicles in fly mode when spawned above ground, and if so, is there a way to disable it? Still, I would like to know which one is faster in any case.
  18. Fiddi

    Calling Custom Compositions?

    Let's hope then that they implement it sometime.
  19. Great! In theory you could put the entire script in myaction.sqf inside the addaction, if it's not too long.
  20. Yes, my mistake. It should look like the second one.
  21. Yeah, you have missed a semicolon somewhere. EDIT: but your code seem to be correct? I'm not sure what's wrong then, try a space between {[] execVM myaction.sqf; (_this select 0) removeAction (_this select 2);} like so
  22. I think this should work: (leader _grp) addAction ["myaction", {[] execVM myaction.sqf; (_this select 0) removeAction (_this select 2);}]; EDIT: Got it abit wrong, fixed.
  23. This should work: (leader _grp) addAction ...
×