Jump to content
Sign in to follow this  
Purzel

Waypoint scripting: Pilot should get from 1st floor to rooftop into chopper

Recommended Posts

Hi there,

I´ve got a problem:

I want to get my standing pilot (without any WP until now) starting from the 1st floor to get on the rooftop into the empty chopper (as "Pilot" in "Orca1").

The he shouldt start the engines and wait for a second soldier, which should get in that Chopper und after that, they will fly away.

But it does not work! The pilot will start, but he went DOWNstairs, not UPstairs

Helpful hints anyone?

This is what I´ve got:

a helicopter "Orca1" on the rooftop.

a pilot waiting in first floor to get "activated" by the trigger.

a commander waiting in another room to get "activated" by the trigger.

a trigger, which starts both units to run to the chopper via the .sqf-files

two .sqf-files, which should create the waypoints for both units.

Trigger activation:

nul=[] execVM "PilotWP.sqf";nul=[] execVM "ChefWP.sqf";

Pilot.sqf:

sleep 10;
_this = Pilot addwaypoint [getPos "Orca1", 0];
_this setWaypointType "MOVE";
_this setWaypointSpeed "FULL";
_waypoint_0 = _this;
sleep 1; 
_this = Pilot addwaypoint [getPos "Orca1" 0];
_this setWaypointType "GETIN";
_this setWaypointSpeed "FULL";
_waypoint_1 = _this;
sleep 1; 
_this = Pilot addwaypoint [getMarkerpos "Fluchtmarker2",0];
_this setWaypointType "MOVE";
_this setWaypointSpeed "FULL";
_waypoint_2 = _this;
hint "3 WP created.";

Chef.sqf:

sleep 10;
_this = Chef addwaypoint [getPos "Orca1", 0];
_this setWaypointType "MOVE";
_this setWaypointSpeed "FULL";
_waypoint_0 = _this;

_this = Chef addwaypoint [getPos "Orca1" 0];
_this setWaypointType "GETIN";
_this setWaypointSpeed "FULL";
_waypoint_1 = _this;

Edited by Purzel

Share this post


Link to post
Share on other sites

Have you tried a waypoint at 0 height then a waypoint at whatever the height of the rooftop is? That's what I do with a starting soldier on a pier. If I place him at 0, he spawns at the water level inside the pier, if I choose his start height at like 4, he spawns on top of the pier just fine. I've done the same with buildings too for starting characters. I'd assume waypoints would work the same.

Share this post


Link to post
Share on other sites

Give your a pilot a group. Under the pilot init put grpP = group this

_wp1 = grpP addWaypoint [position orca1, 0];
_wp1 setWaypointType "GETIN";
_wp1 setWaypointSpeed "FULL";

_wp2 = grpP addwaypoint [getMarkerPos "Fluchtmarker2",0];
_wp2 setWaypointType "MOVE";
_wp2 setWaypointSpeed "FULL";

Share this post


Link to post
Share on other sites

You probably wouldn't even need .sqf files for that

Just assign both units to the chopper with assignasdriver and assignascargo,

pilot assignasdriver chopper;
officer assignascargo chopper;

then in the proper trigger give them a

[pilot,officer] ordergetin true;

command, then make another trigger that checks when both units are inside the chopper and use the

chopper move getmarkerpos "marker1";

command.

Here's a quick mission so you can see for yourself.

Share this post


Link to post
Share on other sites
You probably wouldn't even need .sqf files for that

Just assign both units to the chopper with assignasdriver and assignascargo,

pilot assignasdriver chopper;
officer assignascargo chopper;

then in the proper trigger give them a

[pilot,officer] ordergetin true;

command, then make another trigger that checks when both units are inside the chopper and use the

chopper move getmarkerpos "marker1";

command.

Here's a quick mission so you can see for yourself.

Try that with the helicopter on a rooftop and see how it works out. The AI are going to be glitching through the walls and floor.

Share this post


Link to post
Share on other sites

That's most likely the fault of how AI are boarding vehicles, can't think of any workaround.

They will somehow disable collision and board vehicles through H barriers and buildings, been like that since forever.

Would like to know if it's possible to actually make them board properly.

Share this post


Link to post
Share on other sites

My Problem is, that the pilot runs from first floor to ground, walks around and then he enters the chopper (we remember: parking on rooftop!) from the ground floor.

He disappears in a room like a magician. But he should be a sniper-target on the rooftop.

@ Grumpy Old Man: I appreciate your work, but I cannot open it in ArmA-editor.

I already set a few more WP over the stairs to "lead" the pilot upstairs - it wont work!

Edited by Purzel

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  

×