Jump to content
Sign in to follow this  
terox

How to Return gunner of turret

Recommended Posts

How do i return the object that is a gunner of a turret ?

assignedVehicleRole returns the position a unit is supposed to be in,

This is not necessarily the position the unit is in.

The crew command will return crew in order [driver,gunner,commander,turrets,cargo]

however if there is an empty position, it removes the element, therefore cargo could be in the turret element position

Share this post


Link to post
Share on other sites

Try this thread: B.I. Forums

By UNN:

Since version 1.08 of Arma, you can now use this function to return all the Gunners in a vehicle:

[_Vehicle] Call {Private=["_Gunners"]; _Gunners=[]; {If (Count (AssignedVehicleRole _x)>1) Then {_Gunners=_Gunners+[_x]}} ForEach (Crew (_This Select 0)); _Gunners}

Share this post


Link to post
Share on other sites

Thx Q (How did I miss that)

@ Snakeman, assignedVehicleRole has issues and is not reliable

Assigned role is the role the unit has been assigned too for a given vehicle, this does not mean the unit is even in the vehicle

Share this post


Link to post
Share on other sites

assigned vehicle roles also doesnt broadcast over the network, so therefor use of it in mp is useless

Share this post


Link to post
Share on other sites
Thx Q (How did I miss that)

Because with the wiki's search unless you know the exact name of the command or exact name of a command that happens to link to your command it's impossible to find it. Sure many commands are on the "" page, but many others are not.

At least you can use assigned vehicle roles for controlling server-side AI...

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  

×