yamajin82 10 Posted September 19, 2013 Hello, I am making a mission where you are patrolling from town to town and only want the enemy AI to engage if I am say within 50m of them or so. As of now I am getting essentially what I want with a trigger making me captive from the start, then when I enter their vicinity I have a trigger set to not captive, then once I have cleared out the enemy I have another trigger that sets me to captive again. This works to a certain extent but I was wondering if there is a more tidy and smart way of doing it? Thanks. Share this post Link to post Share on other sites
lappihuan 178 Posted September 25, 2013 You could use: disableAI "AUTOTARGET"; but i think your way is much simpler and does it's job. :) E: https://community.bistudio.com/wiki/disableAI Share this post Link to post Share on other sites
gammadust 12 Posted September 25, 2013 you may also try to give a suitable waypoint type - Seek & Destroy mentions "A leader on foot will rarely search more than 50m from the waypoint". Haven't actually tested to vouch for its reliability though. Share this post Link to post Share on other sites
Tajin 349 Posted September 26, 2013 1. Put "player setCaptive true" somewhere in your init 2. Create a trigger and give it a name 3. Put "yourtrigger attachTo [player,[0,0,0]]" somewhere in your init 4. Set trigger to 50m and enemy presence. 5. Set trigger activation to "player setCaptive false" 6. Set trigger deactivation to "player setCaptive true" Voila... as simple as that. Using attachTo with triggers can be very very useful. (yet most people do not even know it's possible) Share this post Link to post Share on other sites
yamajin82 10 Posted September 26, 2013 Thanks everyone! Tajin, your suggestion sounds promising. When I put "yourtrigger attachTo [player,[0,0,0]]" I get an error that says "Type String, expected nothing". I don't know much about scripting, any ideas? Share this post Link to post Share on other sites
Tajin 349 Posted September 26, 2013 Yup, remove the quotes and replace "yourtrigger" with whatever name you gave your trigger. Share this post Link to post Share on other sites
yamajin82 10 Posted September 26, 2013 aha! works brilliantly! Thanks for your time guys. Tajin, would this also work for each member of my squad if I just made triggers for each member and attached each trigger to them? Share this post Link to post Share on other sites