Search the Community
Showing results for tags 'setcurrentwaypoint'.
Found 1 result
-
setcurrentwaypoint Error with SetCurrent Waypoint.
Crotchety_Old_Buzzard posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
I am getting "Error Type Array, expected Group" when attempting to use setCurrentWaypoint, even though I am putting a group class variable in the correct position in the following script: _grpLiftHeli = createGroup east; _vehLiftHeli = createVehicle ["O_Heli_Transport_04_F", getMarkerPos "wpHeli_1", [], 0, "FLY"]; createVehicleCrew _vehLiftHeli; _vehLiftHeli setDir 240; _grpLiftHeli addVehicle _vehLiftHeli; _wpHeli1 = _grpLiftHeli addWaypoint [getPos wp6, 0]; _wpHeli1 waypointAttachObject TempTarget; _wpHeli1 setWaypointType "HOOK"; _grpLiftHeli setCurrentWaypoint [_wpHeli1, 1]; //group _vehLiftHeli setCurrentWaypoint [_wpHeli1, 1]; The error always gives the setCurrentWaypoint line number with the above listed explanation. I use prefixes that tell me the data type of the variables to avoid these kinds of trouble. As you can see, _grpLiftHeli is the created group I am using. addVehicle and addWaypoint require a Group Data Type for their opening parameters, as does setCurrentWaypoint. I used the same variable "_grpLiftHeli" for all three statements, yet, while addVehicle and addWaypoint give no errors, setCurrentWaypoint gives the "Error Type Array, expected Group" message. In the debug console I watched "xxx = groupID _grpLiftHeli;" and got back "Alpha 2-1", so it seems to be a proper group. I also tried replacing the last code line with the commented code line below it with the same results. I believe my syntax is correct based on BIS wiki, but know I still make mistakes. If anyone can explain this to me, I would be greatly appreciative. EDIT: I forgot to mention that I used the same general setup for creating a vehicle convoy and had no problems with the error. setCurrentWaypoint worked fine.