Try watching waypointType in the editor. It asks for an array. when you give it an object array it asks for an object.
{F19850}
Description
Details
- Legacy ID
- 1852069466
- Severity
- None
- Resolution
- Open
- Reproducibility
- Have Not Tried
- Category
- Scripting
Scripting a trigger to setWapypointType with:
< [grp1, 0] setWaypointType "HOLD" >
returns a similar error.
Event Timeline
This seems related to, if not a duplicate of #0009251.
I only had trouble with addWaypoint, but will re-check that this indeed the case.
[grp1, 1] setWaypointType "HOLD";
Should work, I don’t think you can set the "0" waypoint type for any unit/team other than move it to their (or the leaders if a group of 2 or more units) location if you have used the copy waypoints function.
The starting point that a unit is placed in the world is their [unit_grp, 0] point, you can only change the type of [unit_grp, 1] and above as the [unit_grp, 0] waypoint is always completed thus [unit_grp, 1] can only ever be the next uncompleted waypoint.
I have been using triggers to set waypoint types, move waypoints and copy waypoints all weekend with no problems.
Waypoint 0 is the starting position of the unit. It is immediately completed, and the current waypoint becomes -1 if there are no further waypoints assigned.
Using addWaypoint [position, radius, 1] has the desired effect, and can be subsequently assigned a type using [group, 1] setWaypointType "xxxx" Perhaps this is what IconoclastDX is doing, but without further elaboration, it's hard to tell.
I've tried to reproduce this issue, and can confirm that using setWaypointType does work correctly when used in a trigger activation field, and I would suggest that the initial reporter is seeing the results of the addWaypoint error. #0009251
As soon as I opened your mission I realised my mistake of not assigning the added waypoint to a var. For some reason I persisted in not using assignment while creating the reproduction steps, yet I had initially when the problem was first encountered.
The backwards error of "type array expected nothing" and cryptic rpt entries don't help matters.
Mass closing ancient tickets with no activity for > 12 months; assume fixed or too trivial.
If this issue is still relevant in current dev build, please re-post.