Page MenuHomeFeedback Tracker

setWaypointType and other waypointType related gets do not function properly
Closed, ResolvedPublic

Description

Try watching waypointType in the editor. It asks for an array. when you give it an object array it asks for an object.
{F19850}

Details

Legacy ID
1852069466
Severity
None
Resolution
Open
Reproducibility
Have Not Tried
Category
Scripting
Steps To Reproduce

Scripting a trigger to setWapypointType with:
< [grp1, 0] setWaypointType "HOLD" >
returns a similar error.

Event Timeline

IconoclastDX edited Additional Information. (Show Details)
IconoclastDX set Category to Scripting.
IconoclastDX set Reproducibility to Have Not Tried.
IconoclastDX set Severity to None.
IconoclastDX set Resolution to Open.
IconoclastDX set Legacy ID to 1852069466.May 7 2016, 2:33 PM

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.

b101uk added a subscriber: b101uk.May 7 2016, 2:33 PM

[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 I said I don’t have any problems, attached “int_waypoints.Stratis.zip” as proof.

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.

MadDogX added a subscriber: MadDogX.May 7 2016, 2:33 PM

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.