Jump to content
Sign in to follow this  
colonelmolerat

Having trouble adding a waypoint. This script ok?

Recommended Posts

I'm trying to use a trigger to add a waypoint for some units.

The units start in a helicopter, land, get out, move, then join group null and split off, then sit down and rejoin their group (this group is empty when they rejoin, it's just so I can call them both easily).

When the trigger is called, I want them to stand up again and move to another waypoint.

I can do this when units have had no waypoints before, but I can't get it to work for those units.

Here's what's in the trigger that makes them sit down, and rejoin a group:

[arnold, "SIT_LOW_U", "ASIS"] call BIS_fnc_ambientAnim;
chopcrew = group arnold;

For the second line I've also tried 'arnold join chopcrew'

(The other unit is the same, but 'arnold' replaced by 'barry'.)

Here's what's in the trigger:

board = chopcrew addwaypoint [Chop, 0];
[chopcrew, 0] setwaypointtype "Get In";
chopcrew setcurrentwaypoint [chopcrew, board]

(Chop is the name of the helicopter I want them to get in, board is the name of the waypoint I'm setting, chopcrew is their group).

Can anybody help please?

Edited by ColonelMolerat

Share this post


Link to post
Share on other sites

Hi, ColonelMolerat

if a unit exist a waypoint before, i suggest using "setCurrentWaypoint" command

_waypoint=group _veh addWaypoint[getMarkerPos "nextWayPoint",0];
	group _veh setCurrentWaypoint _waypoint;

Share this post


Link to post
Share on other sites

Hello, if you look at the end of the second piece of code, I'm already using 'setcurrentwaypoint' with no luck.

Share this post


Link to post
Share on other sites

for the chopcrew, you may need to find who is the pilot first

Share this post


Link to post
Share on other sites

What would I do then? (I can just try it for both units and see which works to find out the pilot).

Also, neither are actually moving, they just sit there - wouldn't they at least move if that was the problem?

Share this post


Link to post
Share on other sites

maybe try to use the move command on the pilot, but group _veh setCurrentWaypoint _waypoint; works for me

Share this post


Link to post
Share on other sites

I'm wondering if my problem is that I'm not setting their group correctly.

Previously, Arnold and Barry (the pilots) left the group 'chopcrew' and joined group null.

Does 'arnold join chopcrew' and 'barry join chopcrew' work? Or would I need to write something else? Or form a brand new group?

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  

×