Comrades in Arms Discussion Board
CO@10 School is out - Printable Version

+- Comrades in Arms Discussion Board (http://forum.ciahome.net)
+-- Forum: Comrades in Arms Life (http://forum.ciahome.net/forumdisplay.php?fid=3)
+--- Forum: Mission Releases (http://forum.ciahome.net/forumdisplay.php?fid=9)
+--- Thread: CO@10 School is out (/showthread.php?tid=3109)



CO@10 School is out - V_Ninth - 08-30-2015

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


Re: CO@10 School is out - Alwarren - 08-30-2015

Sounds good, looking forward to playing that Smile Welcome to the CiA Forums!


Re: CO@10 School is out - Variable - 08-30-2015

Uploaded!


Re: CO@10 School is out - Alwarren - 09-10-2015

It *seems* to me that the loadouts are duplicated. How do you apply them?


Re: CO@10 School is out - V_Ninth - 09-11-2015

(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).


Re: CO@10 School is out - Varanon - 09-11-2015

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.


Re: CO@10 School is out - V_Ninth - 09-11-2015

(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)?


Re: CO@10 School is out - Outlawz7 - 09-11-2015

See this for loadouts
http://ciahome.net/forum/mission-making/mission-making-tips-and-tricks/


Re: CO@10 School is out - V_Ninth - 09-11-2015

Thanks Outlawz7!