Page MenuHomeFeedback Tracker

addWaypoint does not work with positions derived from markers
Closed, ResolvedPublic

Description

attempting to add a waypoint via the addWaypoint command does not work when the position supplied is obtained through the markerPos command.

Details

Legacy ID
704779511
Severity
Major
Resolution
Not A Bug
Reproducibility
Always
Category
Scripting
Steps To Reproduce
  1. create a playable infantry unit and name it blu1.
  2. create a maker on the map and name it myMarker
  3. create a trigger (your choice of how to activate it) with the following in the on act box:

newWP = group blu1 addWaypoint [markerPos myMarker,0]; newWP setWaypointVisible true; newWP setWaypointType "MOVE";

  1. begin the game as blu1 and activate the trigger. Observe that no waypoint in created.

Event Timeline

TraxusIV edited Steps To Reproduce. (Show Details)Mar 14 2013, 1:24 PM
TraxusIV edited Additional Information. (Show Details)
TraxusIV set Category to Scripting.
TraxusIV set Reproducibility to Always.
TraxusIV set Severity to Major.
TraxusIV set Resolution to Not A Bug.
TraxusIV set Legacy ID to 704779511.May 7 2016, 12:34 PM

This is not a bug, you actually have an error in your SQF syntax - putting the markerPos command inside array brackets will create an array within the array. Instead, it needs to look like this:

newWP = group blu1 addWaypoint (markerPos myMarker);

^^ The above is confirmed as working (tested it myself). Closing issue.