Jump to content

mattsmith94

Member
  • Content Count

    11
  • Joined

  • Last visited

  • Medals

Community Reputation

10 Good

About mattsmith94

  • Rank
    Private First Class

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. I am trying to update the position of the marker when the gun is fired. The marker will create but will not update after the first shot. EH (_pick) addEventHandler ["fired", { call myFunction; _unit = _this select 0; _unitloc = getPosASL _unit; hint format ["%1 Location",(getPosASL _unit)]; while {a < b} do {"YourMarker" setMarkerPos _unitloc;}; _marker = createMarker ["YourMarker", _unitloc ]; "YourMarker" setMarkerType "mil_triangle"; "YourMarker" setMarkerSize [1, 1]; "YourMarker" setMarkerDir 0.93884; "YourMarker" setMarkerColor "ColorRed"; }]; and Here is the full script _Array1 = []; _Array2 = []; GBL_BulletsFired = 0; // { if (side _x isEqualTo EAST) then { _x sideChat "You are an Enemy!"; _Array1 = _Array1 + [_x]; sleep 0.5; }; } forEach allUnits; _count = count _Array1; for "_i" from 0 to _count do { _total = (count _Array1); //hint format ["Array Total: %1",_total]; //sleep 2; if (_total==0) exitwith {hint "Script Setup Complete"}; _rnd = floor (random _total); //hint format ["Random Number: %1",_rnd]; //sleep 2; _pick = _Array1 select _rnd; //hint format ["Soldier Picked: %1",_pick]; //sleep 2; _Array1 = _Array1 - [_pick]; //hint format ["%1 has been removed from _Array1",_pick]; //sleep 2; _Array2 = _Array2 + [_pick]; //hint format ["%1 has been added to _Array2",_pick]; //sleep 2; (_pick) addEventHandler ["fired", { call myFunction; _unit = _this select 0; _unitloc = getPosASL _unit; hint format ["%1 Location",(getPosASL _unit)]; while {a < b} do {"YourMarker" setMarkerPos _unitloc;}; _marker = createMarker ["YourMarker", _unitloc ]; "YourMarker" setMarkerType "mil_triangle"; "YourMarker" setMarkerSize [1, 1]; "YourMarker" setMarkerDir 0.93884; "YourMarker" setMarkerColor "ColorRed"; }]; }; myFunction = { GBL_BulletsFired = GBL_BulletsFired + 1; hint format ["Shots Fired: %1",GBL_BulletsFired]; };
  2. mattsmith94

    FiredNear Event handler.

    because I want to have unit A ... a drone moving and detecting fire with in 1km .. i tried using fired but it ment needing to add an event handler to every other unit in the game.
  3. mattsmith94

    FiredNear Event handler.

    this addEventHandler ["FiredNear", "if (drone1 distance (_this select 1) < 3500) then {hint 'unit in range';}"] this is my current init line above in the the drone (drone1) how ever even if I change it to the following bellow this addEventHandler ["FiredNear", "if (drone1 distance (_this select 1) > 1000) then {hint 'unit in range';}"] it doesnt seem to make a difference, the range still seems limited to 50m Again thanks to anyone who can shead some light on this
  4. Is there a way of extending the range of the fired near event handler. I am looking to be able to detect a firer with in the range of up to 1km minimum. Thanks in advance
  5. Ok thanks, il give it a go Also I just literally played antistasi, great work.
  6. I thought I'd go ahead and try and clear up the process a little more. 1. When a unit is in range of the vehicle (1km) and an opfor unit fires execute script "fired" 2. [script Fired] show units (who fired in range of the vehicle) on the vehicle occupants map for 5 seconds 3. Hide units again.
  7. Hi, Relatively newbie scripter here, I am trying to create a simulation of an Acoustic Multi-Mission Sensor (AMMS) for Arma 3 however I was hoping on getting some advise on how to proceed with this. AMMS is pretty similar to Boomerang however it is the individual sensor which can be mounted to any vehicle and provide a location on GPS. I apologize in advance for my description, Im not entirely sure if I have thought it all through but hopefully someone can make sense of it. The aim would be to write a script that would act as a sensor and could be added or executed in the init field of any vehicle. My first thoughts on how to do this were as follows Add a fired event handler and execute a script when fired "fired" in the "fired" script I would like the unit to become visible on the map for a short amount of time, maybe 5 seconds, then if possible a decay of 5 seconds. thus producing a indication of where a shooter is when the shot is fired. (counter sniper tactics) I would like the unit to only show up on the map for the vehicle occupants, predominantly the driver and gunner. If anyone can make sense of my scrawling or even better, manage to point me in the right direction. Thanks Matt
  8. mattsmith94

    Indication of Weapon Firing.

    Perfect, Thank You
  9. I want to write a script which is triggered by a weapon firing. In this case the weapon is vehicle mounted (Tank Main Gun) but could also be extended to Rocket Launchers or Placed Explosive Devices. Could any one please advise how to detect when a weapon has been fired. Thanks
  10. mattsmith94

    Time Trial

    hi guys, i am going to try to create a script that activates a timer when leaving a trigger and ends when entering a different trigger. Then outputs the time on the screen. The Main bit that I am unsure about is what function I can use to track time
×