Jump to content
Sign in to follow this  
kocrachon

setwaypointstatements script help?

Recommended Posts

Hello,

I am trying to make a script where when a specific set of actions is complete, my helicopter drops everything it is doing and flies to a specific location and lands, however, for some reason, it just hovers over the H pad, not landing like its suppose to, here is what I have.

_wp1 = _squad addWaypoint [_pos, 0];

deleteWaypoint [_squad, 1]
deleteWaypoint [_squad, 2]
deleteWaypoint [_squad, 3]
deleteWaypoint [_squad, 4]
[_squad, 1] setWaypointPosition [_pos, 0];
[_squad, 1] setWaypointType "MOVE"; 
[_squad, 1] setWaypointStatements [""true"", ""bird1 land """"LAND""""""];
_squad setCurrentWaypoint [_squad, 1];

_squad dofollow _squad; 

I have tried a HUNDRED ways to get the setwaypointstatements and its not working. Anyone able to help me out with the setwaypoints statements part?

Share this post


Link to post
Share on other sites

Maype...

[_squad, 1] setWaypointStatements ["true", "[color="Red"]bird1 land "LAND"[/color]"];

Edited by Imutep

Share this post


Link to post
Share on other sites
Maype...

[_squad, 1] setWaypointStatements ["true", "bird1 land "LAND""];

tried that, it doesn't work...

Share this post


Link to post
Share on other sites

Try this one...

[_squad, 1] setWaypointStatements ["true", "[color="Red"]bird1 land 'LAND'[/color]"];

Share this post


Link to post
Share on other sites

it does work to an extent, when I make a script using just that it works, however...

When I combine it with the rest of my script, the helo no longer wants to land, perhaps an issue with my script?


_wp1 = _squad addWaypoint [_pos, 0];
[_squad, _wp1] setWaypointPosition [_pos, 0];
[_squad, _wp1] setWaypointType "MOVE";
[_squad, _wp1] setWaypointStatements ["true", "_helo land 'LAND'"];
_squad setCurrentWaypoint [_squad, _wp1];

Share this post


Link to post
Share on other sites

I am running into a similar issue, i cannot get the setwaypointstatements to work no matter what I put in it.

Share this post


Link to post
Share on other sites

You could make the waypointstatement code

hint "hello"

To make sure code is being run. Then run your other code.

use -showscripterrors if not allready

For chopper to land try heliname Land "getin"

Syntax should be ok but in your code just replace "Land" with "getin"

you only need double " if you are within "" so "Land" becomes """Land""" in the general sense.

Once that works try it in a hot LZ and see if theres any new issues.

Edited by TJ72

Share this post


Link to post
Share on other sites

Well the reason I have ""land""" is because of the way the waypointstatement works..

[_squad, 1] setWaypointStatements ["true", "bird1 land "LAND""];

and no, unfortunately even with that change the helo still isn't landing.

Also, I am trying to reframe from using names in the script. In the long run the script is going to create a helicopter, and the script will be activated on many times. Every time my guy shoots a flare, a helicopter will fly, land, drop some forces, leave, and get deleted. If he shoots a red flare, it flies, lands, picks him up, and moves to the next landing zone.

I am able to get it to drop forces by using the transport unload command. But to pick up him or any other forces I want, I want to use the land "Get In" which I changed it to, but still no avail, so I am running out of ideas as to why this is not working right now...

Edited by Kocrachon

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  

×