Jump to content
Sign in to follow this  
clevortrevor

can ai use a spotter scope

Recommended Posts

Hi

im having a problem getting the ai to use a spotter scope

ive tried the useweapon command but that didnt work

does anyone know how todo this please either by a script or by using the commands

many thanks

trev

Share this post


Link to post
Share on other sites

Heres a simple function I made that makes the ai use, however this was designed for using it in tandem while sniping at long distances.

DZ_FNC_SpottingMode = {
private ["_spotter"]; 
     _spotter = _this select 0; 
     selectplayer _spotter; 
     (vehicle _spotter) switchcamera "GUNNER";
};

I have this in my init.sqf, in editor i made two radio triggers, one for turning it on, and one for turning it off.

for turning it on:

spotter enablesimulation false; FIREEH = sniper addeventhandler ["fired", {nul = [spotter] spawn DZ_FNC_SpottingMode}]

for turning it off:

spotter enablesimulation true; sniper removeeventhandler FIREEH

All this does is freeze the spotter so he doesnt move, then when i teamswitch back to my sniper character and fire, it will switch back to the spotter and be looking through the scope. However im not sure if you are looking for something different. As far as I know, the spottingscope is a vehicle, and you need to use assignasgunner and moveingunner for your spotter to get into it.

Share this post


Link to post
Share on other sites

well all i want is the ai to lay down with a spotter scope i dont want to be able to use him as a player

Share this post


Link to post
Share on other sites
well all i want is the ai to lay down with a spotter scope i dont want to be able to use him as a player

OA came with a script function that would read off the range when you were near a spotter and stopped your scope for a few seconds. It didn't actually use the scope though.

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  

×