Jump to content

_foley

Member
  • Content Count

    155
  • Joined

  • Last visited

  • Medals

Everything posted by _foley

  1. As Harzach pointed out, you need to use a global variable (without the _). Be careful when using it in trigger, as it will throw an error if the trigger is created before the variable is defined. If that's the case, you'll need to first check if the variable is defined (isNil).
  2. To detect when a weapon is fired you can use an event handler like so player addEventHandler ["Fired", { params ["_unit", "_weapon", "_muzzle", "_mode", "_ammo", "_magazine", "_projectile", "_gunner"]; if (_weapon == secondaryWeapon _unit) then { shotsFired = true; }; }]; This will set the shotsFired variable to true when a player fires any launcher. You can limit this to a specific weapon by replacing secondaryWeapon player with the classname of the weapon. If you want this to activate your trigger, put: !isNil "shotsFired" into the condition field.
  3. Hey, I don't see any glaring problems with that snippet so I suspect there is some other script or mod interfering. As a workaround, you can spawn CSAT units and then set loadout for each unit in the group like this _unit setUnitLoadout (getUnitLoadout "MARINE_UNIT_CLASSNAME");
  4. _foley

    Attaching objects

    You can put down the frigate (f) and the gunner (g) in the editor exactly where you need them, disable simulation (in attributes) and then run this in debug console: copyToClipboard str (f worldToModel getPos g); This will copy to clipboard the relative position that you can later use in attachTo.
  5. Thanks man! I've been lurking for a while, finally decided to release something.
×