Jump to content
Sign in to follow this  
nominesine

Counting stuff in MP

Recommended Posts

I'm converting a SP mission to MP, to be played in a LAN-game. How will the following TRIGGER behave in a MP game:

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

CONDITION: count units civMob1 <5

ACTIVATION: nomin_count = nomin_count +1; publicVariable "nomin_count"

It's supposed to add the value one (+1) to the VARIABLE nomin_count (defined by me as 0 in the init.sqs) when the GROUP civMob1 loses too many members, and works good in SP.

I suspect, however, that in a MP game it will add +1 for each player in the network, hence if there are three players it will add +3 rather than +1.

Am I correct? I have no MP-testing oportunities at the moment.

If so, can I solve the problem by changing the TRIGGER this way???

<table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">

CONDITION: local server AND count units civMob1 <5

ACTIVATION: nomin_count = nomin_count +1; publicVariable "nomin_count"

I would prefer to use simple corrections like these, because the mission is already made and working in SP. Changing the basic structure will increase the workload for yours truly too much.

confused_o.gif

Share this post


Link to post
Share on other sites

Yes, you will just need a game logic named server placed on the mission for that to work.

Share this post


Link to post
Share on other sites

Thank's. I was afraid I would have to spend hours correcting my mistake.

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  

×