Search the Community
Showing results for tags 'fired'.
Found 6 results
-
"FiredMan" and "Fired" event handlers on the same unit?
LSValmont posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
FiredMan can complete replace Fired. Problem solved, please close this.-
- event handlers
- fired
-
(and 2 more)
Tagged with:
-
Is there a way to contain a Fired eventhandler to a trigger area? [SOLVED]
Mungo Turkey posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello everyone. Apologies for being useless and having to come on here, but I'm stuck. Using VCOM AI (when units are grouped) the firefights are really good. My goal is to make the AI behave naturally to gunfire before they all 'knowsabout' you. At default it is really, really bad. My idea was to simulate the sound of gunfire carrying realistic distances (using triggers of up to 1km or more) and then have the AI react appropriately within these trigger areas when any shots are fired. I am nearly there. I don't understand SQF, but I spliced these things together from looking through the forums. Player squad is called GT. OPFOR units named a1, a2, a3, a4, a5. In the (player's) Object Init box - {_x addEventHandler['Fired',{shotIsFired = true}]} forEach (units GT); note - I would do it for all OPFOR units as well so they react the same if OPFOR fired first. In the Trigger named T1 - Activation - Any group member Activation type - Present Condition Expression - shotIsFired On Activation - [a2,a3,a4,a5] join a1; a1 reveal [GT, 1.7] This works brilliantly. They don't know exactly where I am, but they break out of ambient animations/patrol cycles instantly, huddle up (group) and take appropriate action. As they would in reality when hearing the shot. The problem is it will trigger if GT shoots outside the trigger area, they could be on the moon and it triggers! It is completely irrelevant to what settings I use in the trigger, what size or who I try to group to sync to, any of it. If anyone could help that would be great. Thanks in advance.- 5 replies
-
- triggers
- artifical intelligence
-
(and 2 more)
Tagged with:
-
I seem to be having a little trouble assessing exactly what type of thing a unit has fired using the fired event handler. Basically I want to know if the unit is shooting a gun, shooting a launcher or throwing an item. So far I'm working with something like this, coming from the FIRED event handler: _unit = _this select 0; _weapon = _this select 1; _muzzle = _this select 2; _mode = _this select 3; _ammo = _this select 4; _magazine = _this select 5; _projectile = _this select 6; _vehicle = _this select 7; _muzzleActual = (_unit weaponAccessories currentMuzzle _unit) select 0; And then: _typeOfProjectile = (typeOf _projectile); if (_typeOfProjectile isKindOf ["Grenade",configFile >> "GrenadeCore"]) then {hint "Grenade Thrown"}; _typeOfProjectile = (typeOf _projectile); if (_typeOfProjectile isKindOf ["BulletBase",configFile >> "BulletCore"]) then {hint "Gun Fired"}; _typeOfProjectile = (typeOf _projectile); if (_typeOfProjectile isKindOf ["MissileBase",configFile >> "MissileCore"]) then {hint "Launcher Fired"}; I'm aware i'm probably not using these right; I was just messing around with using either strings or configFile until it stopped giving me errors. The grenade one works just fine, but I'm not getting notified if I fire a launcher or shoot a gun. It might be that it's better to assess the weapon or the magazine or whatever, but the furthest I managed to get so far used this approach. Thanks in advance Law
-
Hello, I've been succesfully using this "safezone.sqf" script to restrict small arms fire, throwing grenades and placing explosives inside a "spawn protected area" which essentially is a trigger area. I assume the script itself is an evolution of grenadeStop.sqf by Bake or it could be from completely different origins who knows. In short what the script does is that it will delete the fired projectile, thrown grenade or placed explosive and display a message that can be customized freely with #define MESSAGE "Type your message here" To add the restriction to certain projectile, grenade or explosive the classname needs to be typed in the SPAWN_Restriction = -field I was trying to use the aforementioned script to also restrict vehicles from firing their guns inside the spawn protected area but it is so that declaring the ammo classnames (that are used in different vehicles) in the SPAWN_Restriction = ["insert ammo classname here"]; is not enough to get the job done. The question here would be that: whether the safezone.sqf can be adapted in a way so that using vehicle guns (or "turrets") to shoot inside the spawn protected area would also be restricted? (if so, any suggestion on how-to?) OR if I should start looking for a completely different approach with the issue at hand (if so, any suggestions what should that approach then be)? There weren't too many discussions available that did share somekind of similarity with what I'm asking here. I actually only found this and this but well, for me those didn't give the comforting "I got this and I know I can do this" feeling. Thus here I am, asking questions. Greetings Asmodeuz
- 2 replies
-
- fired
- addeventhandler
- (and 4 more)
-
Dropping a live grenade from drone
shelldrake posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hi all, been lurking on the forums for a while now but this is my first request for help with triggers. I am trying to make a line that spawns a live grenade (preferably a 40mm he grenade) and drops it from a drone flying above. Basically replicating what groups are doing in the middle east with rec. drones, any help will be appreciated. I have tried "G_40mm_HE" createVehicle (getPos drone) (drone being the name of the object it's spawned to) I've used this in the past for other classnames used for explosions on the ground, but I think I'm having trouble with the grenade being 'live'. Thanks in advance all. Cheers- 4 replies
-
- createvehicle
- grenade
-
(and 2 more)
Tagged with:
-
Add eventHandler to every player in TriggerArea
pilla95 posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I want to add the Fired eventHandler to every player that walks into my TriggerArea. My current setup is below. However, what seems to be happening is that it is only applying it to a few players (for the most part none). It always seems to add it to me, but not really to the other 70+ players. Condition: this && (player in thisList) || (vehicle player in thisList) On Activation: eh1 = player addEventHandler ["Fired", {deleteVehicle (_this select 6);}]; On Deactivation: player removeEventHandler ["Fired", eh1]; This works perfectly on me, and 1 of my friends. However, it is not adding the event to other players that walk into the TriggerArea. Would it be smart/efficient to loop through theList and add the event to everyone in On Activation?- 6 replies
-
- triggerarea
- eventhandler
-
(and 1 more)
Tagged with: