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

mortar not firing in MP dedi server. my code in Trigger as follow

 

None, Blufor , Present, Cond : this , On Act :  nul = [] spawn { 
 for "_i" from 1 to 4 do  
 { 
 mortar1_2 commandArtilleryFire [[getPos player select 0, getPos player select 1, (getPos player select 2)], "8Rnd_82mm_Mo_shells", 4]; 
 sleep 180; 
 }; 
}; 

 

 

any help please. Thank you

Edited by JURAGAN
double posting

Share this post


Link to post
Share on other sites
50 minutes ago, pierremgi said:

don't double post!

sorry for that. thank you.

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

×