OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: UH60MG on 07 Apr 2009, 14:05:01
-
Hello,
I want to generate 1 random number for all the machines in a multiplayer COOP game, then I want to spawn the enemies using CreateUnit. How do I do this so I dont get multiple copies?
I am using .sqs scripts.
-
//Init
Random_array = [];
for "_i" from 0 to MAXNUMBER do {
Random_array = Random_array + [_i];
};
//Get random number:
_random = Random_array select floor random (count Random_array);
Random_array = Random_array - [_random];I'm using SQF.
-
CreateUnit is global BTW so no need to execute it on every client.
-
CreateUnit is global BTW so no need to execute it on every client.
That is helpful. Is there a list anywhere of which commands are global?
-
Check the "Links" section of this site (http://community.bistudio.com/wiki/Image:effects_global.gif). The list is not complete yet but it's a good start.