Jump to content
Sign in to follow this  
Faye

Random place a transport pickup

Recommended Posts

I can figure out the means to place a object/men in a random location but the "transport"script wont work then. I group the waypoint witht he random location but nothing happens. If i play the mission the waypoint points me in the right direction but the person doesnt get in.

What do I miss.

P.S i looked at the little bird patrol mission but that makes a random location out of the blue. i however want to determine the location and drop but random those locations to get a bit of randomish to it

Share this post


Link to post
Share on other sites

For a person to get in, you need a "get in" waypoint on the person who is going to get picked up. Possibly, you need to make sure he doesn't actually get to that waypoint until the helicopter is in the area.

Other options include scripting commands AssignAs... and orderGetIn (and a similarly named command to avoid the vocals.)

Share this post


Link to post
Share on other sites

I use the following code snippet in a mission for ArmA2 to board people. There are some macros and constants being used, but it should be pretty obvious. I'll comment inline.

 // PlayerChopper is the player's helicopter name
 // missionPickupPos is the location where the people to board the helicopter wait
 // PICKUP_DIST is a constant, I've set it to 100
 waitUntil {(PlayerChopper distance missionPickupPos < PICKUP_DIST)};
 // Once PlayerChopper is closer than PICKUP_DIST to missionPickupPos, wait for
 // the helicopter get close to the ground, e.g. 2 meters here
 waitUntil {(HEIGHTOBJ(PlayerChopper) < 2)};
 // Make the people that wait at missionPickupPos and are part of _missionGroup
 // board the helicopter
 {_x assignAsCargo PlayerChopper} forEach units _missionGroup;
 _WP = _missionGroup addWaypoint [(getPos PlayerChopper),5];
 WP(_WP, "GETIN")
 // Wait until boarding is complete
 waitUntil {{alive _x} count (units _missionGroup) == {_x in PlayerChopper} count (units _missionGroup)};
 // Display some message from group leader that all people in the group are in the
 // helicopter
 ABOARD(leader _missionGroup)

Share this post


Link to post
Share on other sites

to pick-up civil just near the player's heli without need of waypoint:

// variables
_passagers = nearestObjects [getPos player , ["Woman01_Random_H","Citizen_Random_H","SeattleMan_ Random_H","Woman03_Random_H","Woman02_Random_H","W orkman_Random_H","Functionary_Random_H"],150];
_grpcivils = group (_passagers select 0);
_vehicule = vehicle player;
_placeslibres = _vehicule emptyPositions "cargo";

// create group of passagers in function of empty place in the player's heli
for "_x" from 1 to (_placeslibres - 1) do {
[_passagers select _x] join _grpcivils;
};

// to make civil get in player's heli
{_x assignAsCargo _vehicule; [_x] orderGetIn true;} forEach units _grpcivils;

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×