Jump to content

AlecW

Member
  • Content Count

    9
  • Joined

  • Last visited

  • Medals

Everything posted by AlecW

  1. As the title implies, I'm having some issues with a script of mine. It works if you hardcode the selections to the array index position, but I'm trying to make it into a cycle, so I don't have to have 7 different buttons for 7 different suppressors (such as the MX SW and MK200.) I've been trying to do it with a for loop, but it keeps getting stuck on index 0. Can anyone spot what I'm doing wrong/suggest a better alternative? _a = 0; _pWeap = currentWeapon player; _muzzleSlot = getArray (configFile / "CfgWeapons" >> _pWeap >> "WeaponSlotsInfo" >> "MuzzleSlot" >> "compatibleItems"); _muzzAmount = count _muzzleSlot; for [{private _a = 0}, {_a < _muzzAmount},{_a = _a + 1}] do { _pSupp = _muzzleSlot select _a; player addWeaponItem [_pWeap, _pSupp]; }; For some reason, it either gets stuck on index 0 or _muzzAmount (this happens if I remove "private" from line 4).
  2. It still goes directly to the last index 😕 That code throws up this error:
  3. AlecW

    count magazine left

    I posted a topic with a bit more info here 🙂
  4. Yeah my bad, I realized after posting that the thread was inactive
  5. AlecW

    Arma Tools

    My thoughts exactly, what with the official program already being called Arma 3 Tools and all
  6. AlecW

    Lost Coordinates [SP/MP 1-4]

    Steam workshop link? Looks interesting enough
  7. Hi there, sorry for the necromancy, but I have a question regarding the laserTarget, I have managed to make a pop-up target spawn at the laser marker (intentional) with the following script: laserT = getPosASL laserTarget player; _target = "TargetP_Inf2_Acc2_F" createVehicle (laserT); Does anyone know how I can make it spawn, first of all, facing me, nevermind this part, figured it out with _target setDir (getDir player); and second of all, with this script (a script that shows small spheres, where you hit the target) in the init: this addEventHandler ["HitPart", { _spr = "Sign_Sphere10cm_F" createVehicle [0,0,0]; _spr setPosASL (_this select 0 select 3); _shooter = _this select 0 select 1; _temp = _shooter getVariable ["hitMarkers",[]]; _temp set [count _temp, _spr]; _shooter setVariable ["hitMarkers",_temp]; }]; Now, I know how to make it work if you just spawn the Pop-up target in the editor, but I would like to transfer that to the in-game spawning script, so that the hit markers show up on the spawned targets. If you would like me to clarify or elaborate on anything, let me know.
×