Jump to content
Sign in to follow this  
fuzi8n

Cut all engines off in a certain area [Possible?]

Recommended Posts

Hello community, I have a bit of a situation; I'd like to cut all the engines to any surrounding vehicles within 500m of the object that turns all the engines off, is this even possible? Also if it is possible, could i be able to turn off the vehicle lights as well? I guess my idea is an EMP within an isolated area. Any help would be greatly appreciated! :)

Share this post


Link to post
Share on other sites

I would use nearestObjects with vehicle classnames and a foreach loop. Forcing engine and lights off using actions doesnt always stick as AI still have control after the command. I would maybe try hit points to destroy the engine of a vehicle. Not sure about the lights, some more research might bring something up.

_vics = nearestObjects [(getMarkerPos "markerName"), ["Classname","Classname"], 500];

{_x setHit ["motor", 1]} foreach _vics;

This would destroy the engine of any vehicle defined in "classname" granted they have a "motor" hitpoint. Hitpoint names are kind of weird. They variate and are sometimes in Slavic or Czech (or something else, not sure).

This whole EMP thing might be hard to do in a universal way. You might have to script it for a specific area with specific vehicles and lights.

Edited by Fight9

Share this post


Link to post
Share on other sites

How do I get this to work on a trigger? I have it working with an init and sqf but it happens as soon as the game starts and I'd like it to work with a radio activation trigger.

_vics = nearestObjects [(getMarkerPos "markerName"), ["Classname","Classname"], 500];

{_x setHit ["motor", 1]} foreach _vics;

This would destroy the engine of any vehicle defined in "classname" granted they have a "motor" hitpoint. Hitpoint names are kind of weird. They variate and are sometimes in Slavic or Czech (or something else, not sure).

This whole EMP thing might be hard to do in a universal way. You might have to script it for a specific area with specific vehicles and lights.

Edited by Fuzi8n

Share this post


Link to post
Share on other sites

Put it in a .sqf file and then call it in a trigger with

null = [] execVM "scriptName.sqf";

make sure you define the marker name and vehicle class names in the script

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×