Search the Community
Showing results for tags 'artifical intelligence'.
Found 1 result
-
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: