Meyumi39 0 Posted June 19, 2023 Hello there, I'm a bit new to these forums but I couldn't find a solution for what I'm trying to do so I figured I would make an account an ask. I'm looking to make a trigger that activates when an opfor unit within a specified zone is killed specifically by the player. Previously I used a trigger that activated when there was simply 1 less opfor unit within its radius, but this has proven to be extremely prone to activating when its not supposed to. Is there any way to do this? I've come across some vaguely similar posts asking about triggers being activated by civilians killed by the player, but unfortunately my coding skills are not good enough to rework that into what im attempting to do. Share this post Link to post Share on other sites
CPT_ALPHA 0 Posted June 20, 2023 Hi, if you mean that an activator is triggered, when an AI dies, you can use the !alive. In the activator put: !alive objetive; I don't know if that's what you meant. Share this post Link to post Share on other sites
Meyumi39 0 Posted June 20, 2023 8 minutes ago, CPT_ALPHA said: Hi, if you mean that an activator is triggered, when an AI dies, you can use the !alive. In the activator put: !alive objetive; I don't know if that's what you meant. Thats partly what Im looking for, but i'm more specifically looking for a way for the game to be able to tell if the enemy has been specifically killed by a player. Share this post Link to post Share on other sites
Larrow 2828 Posted June 20, 2023 Likely better off using an event handler for this rather than a trigger. Something like... //initServer.sqf TheZone = /* trigger, marker, location or area [ [ x, y ], radiusX, radiusY, dir, isRectangle ] */ ; addMissionEventHandler[ "EntityKilled", { params[ "_killed", "_killer", "_instigator", "_useEffects" ]; if (isNull _instigator) then { _instigator = UAVControl vehicle _killer select 0 }; if (isNull _instigator) then { _instigator = _killer }; if ( !isPlayer _killed && { isPlayer _instigator && { side group _killed isEqualTo east && { _killed inArea TheZone }}} ) then { //Do what ever here }; }]; 2 Share this post Link to post Share on other sites
Meyumi39 0 Posted June 24, 2023 On 6/20/2023 at 10:42 AM, Larrow said: Likely better off using an event handler for this rather than a trigger. Something like... //initServer.sqf TheZone = /* trigger, marker, location or area [ [ x, y ], radiusX, radiusY, dir, isRectangle ] */ ; addMissionEventHandler[ "EntityKilled", { params[ "_killed", "_killer", "_instigator", "_useEffects" ]; if (isNull _instigator) then { _instigator = UAVControl vehicle _killer select 0 }; if (isNull _instigator) then { _instigator = _killer }; if ( !isPlayer _killed && { isPlayer _instigator && { side group _killed isEqualTo east && { _killed inArea TheZone }}} ) then { //Do what ever here }; }]; This seems to do exactly what I was hoping for! Thank you so much Share this post Link to post Share on other sites