Jump to content
JURAGAN

[SOLVE] Mortar Not Firing In Dedeicated MP

Recommended Posts

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

Share this post


Link to post
Share on other sites

Player is a different unit on every connected machine, and a dedicated server has no player.  You need to use assigned variables (variable names) for units and then run getPos on them by that means.

Share this post


Link to post
Share on other sites

make the trigger server only

blufor can trigger even if an AI enters, so prefer anyPlayer;

player has no sense on dedicated. (no player), so choose a player : allPlayers select {_x inArea thisTrigger} select 0
 

Share this post


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

make the trigger server only

blufor can trigger even if an AI enters, so prefer anyPlayer;

player has no sense on dedicated. (no player), so choose a player : allPlayers select {_x inArea thisTrigger} select 0
 


[] spawn {
  private _plyr =  allPlayers select {_x inArea thisTrigger} select 0;
  for "_i" from 1 to 4 do {
    if !(alive _plyr) exitWith {};
    mortar1_2 commandArtilleryFire [getpos _plyr, "8Rnd_82mm_Mo_shells", 4]; 
    sleep 180; 
  }; 
};

 

thank you for your fast reply. i just tested using the code you give me, but so sad its not working..... any clues?

Share this post


Link to post
Share on other sites
38 minutes ago, opusfmspol said:

Player is a different unit on every connected machine, and a dedicated server has no player.  You need to use assigned variables (variable names) for units and then run getPos on them by that means.

thank you for your reply and advise.

Share this post


Link to post
Share on other sites
2 hours ago, JURAGAN said:

thank you for your fast reply. i just tested using the code you give me, but so sad its not working..... any clues?

yes my bad:
 

thisTrigger spawn {
  _trig = _this;
  private _plyr = allPlayers select {_x inArea _trig} select 0;
  for "_i" from 1 to 4 do {
    if !(alive _plyr) exitWith {};
    mortar1_2 commandArtilleryFire [getpos _plyr, "8Rnd_82mm_Mo_shells", 4];
    sleep 180;
 };
};

 

Share this post


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

yes my bad:
 


thisTrigger spawn {
  _trig = _this;
  private _plyr = allPlayers select {_x inArea _trig} select 0;
  for "_i" from 1 to 4 do {
    if !(alive _plyr) exitWith {};
    mortar1_2 commandArtilleryFire [getpos _plyr, "8Rnd_82mm_Mo_shells", 4];
    sleep 180;
 };
};

 

just tested . its works like a charm!  thank you very much! 

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

×