Comrades in Arms Discussion Board

Full Version: Per Variable: Help sought to make coop mission play on dedi please
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey gents, first post, thanks for your hospitality.

I make tactically realistic no-respawn scenarios, mainly for DCSW A-10C but also for ArmA.

I've made a good, short, SpecOps POW rescue and extraction mission that plays very well in SP and hosted MP but as Variable and I discovered this morning, it does not appear to have full functionality in a deicated server environment.

As you can see from the download link here, I've used some great scripting tools.  It appears that Kylania's process for bringing the hostage under the Group leader's command using "rescuePOWs.sqf" (attached) does work with a dedi.  I think the little script I used to randomise certain unit start positions also works.  We determined that the following aspects do not work:

- The trigger that summons the extraction helo did not work (it uses player's proximity to the POW):

Code:
player knowsAbout p1 > 0 && player distance  p1 < 5

- The POW's init loadout data did not work, as he appeared fully clothed even though I put him in his skivvies in the unit's init file by removing all uniforms and equipment

- The ability to get the AI to use their laser optics by putting them in combat mode did not work even though they have the correct load out and it works in SP.  The command I used in the units' init files was:

Code:
(units group player) enableIRLasers true

I'd like to make more missions for you guys so it would be really helpful if someone could assist me in learning how to adjust mission design for dedicated servers.  Could someone take a look at the attached files (I hope I am making this very easy) and advise?  Thank you!

Here is a link to the mission with the scripting links I used:

http://www.armaholic.com/page.php?id=19967

Here is the discussion page on the BI forums:

http://forums.bistudio.com/showthread.ph...-Insertion

Finally, I have attached a .rar file with the mission's .sqm file and the one .sqf file used alongside it in the mission folder.  All the other scripting and adjustments are in the units' init fields and trigger fields.

As soon as you guys can help me, I will re-publish the mission with changes made (as long as dedi adjustments do not mess with non-dedi MP functionality).

Thank you very much.
Gonna check a bit more indepth later, but one obvious observation:

"player" is always NULL on a dedicated server, since it always is the local player, which doesn't exist on the dedicated server.

It IS set to the current player on the clients, though, but you have to be mindful about where the code is executed.

For example, the trigger that summons the helo: Is it created dynamically ? Or placed in the editor ? Dynamically created triggers are local, while placed triggers are on every client and the server. This means that the trigger might fire on all client, but since there is no player, it will not trigger on the server, where it actually should trigger since the AI helo is server side.

I name all player guys (like, westMan1_1 to westMan1_x for players in group 1 etc), and make a global variable for the group. This way, the trigger would read:

Code:
playerGroup knowsAbout p1 > 0 && (leader playerGroup) distance p1 < 5

respectively

Code:
playerGroup enableIRLasers true
Thank so much for responding, Varanon.

You explain these localisation issues very clearly and I will see if I can execute them.  The problem right now is that, having spent many, many hours playtesting the mission, I'm a little short of time to trial-and-error my way through a possibly error-filled adaptation for dedicated servers.  As I said, I'm going to try, but I'm relatively new to the Arma engine, have no background in coding -- nor much of a brain for it -- so this stuff does not come easily to me.  My expertise, is in small-unit tactics and tactical doctrine, which I try to translate as faithfully as possible into realistic scenarios.

So what I'm saying is, I'd really appreciate further conversation/counsel in this thread, or direct guidance -- as idiot-proof as possible -- so that I can do this adaptation and learn how to code future missions for a dedi.  Thank you!

A couple of points:

-  All my triggers were added in the editor.

-  If I give my four-man squad -- including the Group Leader who has to execute the script that takes command of the POW - names, as you suggest, how do I set a global variable for this group, i.e. do I use "group_Alpha = group this;" in the team leader's init field and then "playerGroup" can be used in all other trigger conditions without having to reference "Alpha"?

-  Why do you think the init data for the NPC "p1" (the POW) does not execute on a dedi, i.e. he is clothed?