Comrades in Arms Discussion Board

Full Version: CO@10 School is out
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Situation
Intelligence wants the local insurgency joining forces in secret with the Armed Forces of the Russian Federation. More specifically, our external sources talk about a camp located approximately 2.5km NE of Kavala, which serves as a training ground for armored vehicles. It is a place RAF commanders use to train insurgents and supply them with the proper equipment, most probably so they can indirectly cause damage to NATO assets on Altis.

Lacking, however, any solid evidence which can officially prove that fact, command has tasked a small task force to recon the area, obtain that evidence, and then assault and obliterate any enemy presence in the AO.

Notes:
-10 player coop (two fireteams, one apache)
-View distance script, by champ
-AIS script, by Psycho

Mods required:
-RHS
Sounds good, looking forward to playing that Smile Welcome to the CiA Forums!
Uploaded!
It *seems* to me that the loadouts are duplicated. How do you apply them?
(09-10-2015, 08:48 PM)Alwarren link Wrote: [ -> ]It *seems* to me that the loadouts are duplicated. How do you apply them?
It's a loadout script that is executed through the init of the units. The first line in the loadout script is: if (!isServer && !isNull player) exitWith{};. I used to just use !isServer so it would exit on anyone else but the server, but that never worked (can't really understand why), and in some tests I did with friends, adding the !isNull player seemed to make it work (which I can't really understand either).
You also need to ward against double execution. I would suggest also setting a variable on the player object and testing that in the beginning to make sure it's not run twice.

The init field is executed on all clients and again every time someone connects... on a dedicated server, this means it can be executed as many times as there are players.
(09-11-2015, 08:54 PM)Varanon link Wrote: [ -> ]The init field is executed on all clients and again every time someone connects... on a dedicated server, this means it can be executed as many times as there are players.

I think I have misunderstood something.. Are you saying that, despite using  if (!isServer) exitWith {} on an object's field, it will again be executed by the server when a client connects (but not by the client)?

As for the variable, if I execute the script in the init field like this, for example:
if (!isServer && !isNull player) exitWith {};
if (!isNil "medicLoadout") then {medicLoadout=true;publicVariable "medicLoadout"; this execVM "medicLoadout.sqf";};

would that work (I've seen someone using something similar - maybe here on the forums)?
Thanks Outlawz7!