Jump to content
pcc

Selecting a random unit from a side

Recommended Posts

I'm need this for targeting position.

doArtilleryFire [position selectRandom(allUnits side west),"8Rnd_82mm_Mo_shells", 5];

But I'm getting missing ) error in the editor. 

Share this post


Link to post
Share on other sites

 

 

yourartillery doArtilleryFire [position selectRandom(allUnits select { side _x == west } ),"8Rnd_82mm_Mo_shells", 5];

 

should do it...

 

 

Edited by gc8
yourartillery
  • Like 2

Share this post


Link to post
Share on other sites

I am going to place a car on the map.

The car has no crew.

I name the car   car1

How do I get artillery to target this car?   (presume the same shells as in the example above).

.

 

 

Share this post


Link to post
Share on other sites
7 hours ago, Joe98 said:

I am going to place a car on the map.

The car has no crew.

I name the car   car1

How do I get artillery to target this car?   (presume the same shells as in the example above).

.

 

 

 

 

yourartillery doArtilleryFire [position car1,"8Rnd_82mm_Mo_shells", 5];

 

for that to work you must have artillery called yourartillery

 

forgot that from last post

 

  • Like 1

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

×