OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Zorasht on 24 May 2008, 12:20:32
-
Hi.
I have a small problem that is spoiling my whole mission :whistle:
I had two groups of six men each. I want them to start inside an helicopter, both inside the same helicopter.(a chinnok from map air)
The helicopter has a waypoint to unload the passengers at the destination point, and the groups have a synchronized waypoint there to get out.
The missions is for multiplayer, so with the AI disable(using revive script too), each team leader has on the init line
group1 = group this;
group2 = group this;
I have a small script to load the soldiers into the chopper at mission start
_Helo1 = _this select 0;
_Helo2 = _this select 1;
_Group1 = _this select 2;
_Group2 = _this select 3;
{_x moveInCargo _Helo1; sleep 0.50} foreach units _Group1;
{_x moveInCargo _Helo2; sleep 0.50} foreach units _Group2;
As you can see this script was meant for two helos that I used in a previous missions. The only thing I do is in the arguments enter twice the name of the helo, so everybody got loaded on the same helo.
Well, it doesn't work now. Of course it works perfectly when I'm testing it by my own, when we play it online it loads on the helo a random number of people, left other people on the ground, and some of them got the headbug :dunno:
I run the script inside my intro file, I first put a black screen with the mission tittle so nobody can see anything to allow enough time to get loaded in the helo, and after that line I run the script
nil = [TransHelo, TransHelo, group1, group2] execVM "GetInHelo.sqf";and I run the intro in the init line of a static unit on the map.
Any one has an idea of what is this happening?
Is there an easy way of loading two groups into an helo at mission start?
Does it matters that the groups are not full?
Thanks in advance.
-
nil = [transHelo, TransHelo, group1, group2] execVM "GetInHelo.sqf";
I suspect for a start you need the Helis to have different names, like TransHelo1 and TransHelo2
-
player moveInCargo _helo1;
sleep 3.0;
if (!(player in transHelo)) then {player moveInCargo transHelo};Theres a better way to do this but, never the less.
Or:
{_x moveInCargo transHelo} forEach units group this;
Put that in INIT line of Group Leader.
OR
if (alive transHelo) then {player moveInCargo transHelo};
:confused:
Get a better server? :P