Jump to content
fawlty

Help with mortar script

Recommended Posts

Dreadpirate helped me with my heli extract script for dedicated server I originally had for ingame mp hosting.

example

In the player's init:

playersGroup = group this;

Then:

{_x in heli_1} count (units playersGroup ) == {alive _x} count (units playersGroup )

 

Worked great and I appreciate it.

 

 

I have one more  I use with triggers for mortar attacks,  I'm having trouble with

 

Mort1_1 commandArtilleryFire [getpos player, "8Rnd_82mm_Mo_shells", 2]

 

getpos player is not right

 

Once I have this set for dedicated server I should be good for other scripts I use.

Would like to use the mortar script and the extract script in the same mission.

Share this post


Link to post
Share on other sites

getPos units playersGroup select (units playersGroup findIf {alive _x})

 

Finds the first alive unit in the group and uses their position to pass as the mortar target.

  • Thanks 1

Share this post


Link to post
Share on other sites

Thanks jshock I like the alive part to pass on to other players.

 

I also figured this out just to get them to fire and it worked

Mortar2_1 commandArtilleryFire [getpos p1, "8Rnd_82mm_Mo_shells", 5]

 

Naming the players. Going to set up triggers for different players in the group

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

×