OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting Multiplayer => Topic started by: Aplion on 09 Aug 2008, 23:29:42
-
Well ... my question is ....
I have some units moveInCargo to a chopper ... after this chopper get into a trigger I need these units paradropping.
Note that these units are not grouped, just named individual units.
Any help will be much appreciated.
Aplion
-
Check http://www.ofpec.com/forum/index.php?topic=31899.0 (http://www.ofpec.com/forum/index.php?topic=31899.0)
May be of some help?
-
oups .. I missed that :-[
thanks a lot mate ... this seems to be OK for me.
Regards
Aplion
Unfortunatelly my problem is still the same as the line in above source might work fine in SP mission mode but not in MP.
When I'm playing my mission (using nil = [] spawn { { if (((assignedVehicleRole _x) select 0) == "Cargo" ) then { _x action ["EJECT", vehicle _x]; unassignVehicle _x; sleep 1 }; } forEach (crew (vehicle this));};) in MP (me as a server or on a dedi) the units are paradropping without chutes (or they missing their chutes during drop) and at anytime they are dead on ground.
Note that, as said before, the units are not groupped (I want it this way) and my problem is only when the mission is tested in MP mode.
Still need help on that.
-
I am using it for MP for one of clan co-ops! :)
Although the 2nd option i could not get to work the 1st worked a treat.
But i have it for A.I that are para-dropping.
-
In my mission I need use it (this or some other script) for both players and AIs.
Do you use this line into a trigger or a waypoint afterall ?
Aplion
-
I had the line of code in a trigger 'on act' field.
And grouped or snyc'd (which ever one works) the trigger to the chopper
Then when the chopper fly's through the trigger it kicks everyone outta the chopper.
Very nice to watch! Thanks to Spooner :good:
-
I've been tried the waypoint version but it working fine only in SP (editor) mode.
I will try also the triggered version and will see.
-
Be careful using WP's in MP. I suspect them to be local to their group. I had a mission in which the on activation for an AI WP fired only for the server.
-
nope ... Spoones line doesn't working in MP (in my mission at least) either into a trigger or WP. In both cases most of the units (grouped or not) are getting killed as they are falling without chute :(
-
Add a bit of locality checking to that oneliner and it'll probably be fine. Below, a code snippet for ejecting soldiers in cargo of a helicopter named someheli:
nil=[]spawn{{if(local _x&&((assignedVehicleRole _x)select 0)=="cargo")then{_x action["EJECT", vehicle _x];unassignVehicle _x;sleep 2;};}forEach(crew someheli);};(Tested and works both when run from a radio trigger and a waypoint on a dedicated server for me)
The rule is: Only use the action script command where the affected unit is local
EDIT: Fixed - the code snippet was missing a closing curly bracket at the end.
-
sorry but must be an error somewhere in this code as gives me "} missing" message. can you fix it for me please ?
-
Snippet above fixed - the missing "}" was found at a nearby pub and I told it to get back to work instead. :D
-
Seems that it was on Summer period vacation :)
Thanks man ;)