Skip to reading
GDScript Programming & Godot

ClearCharacterWaypoints()

Edition 0.86.4.1 HF1

0.86.4.1 Hotfix 1 edition. Earlier lessons and screenshots retain their original version context; revised references and supplements describe the newer behavior.

Download PDFView PDF page

Character Waypoints: Clear Queue

Empty a character's queued destinations.

Source table from ClearCharacterWaypoints(), page 112
Option key / fieldMeaning and inputDefault
Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await ClearCharacterWaypoints({"characterId": "player"})

In use. Clear an NPC's old patrol before adding a new route. This edits the queue, rather than providing a visible destination or starting a new walk by itself.

AddCharacterWaypoint()#

Character Waypoints: Add Waypoint

Append one destination to a character's waypoint queue.

Source table from ClearCharacterWaypoints(), page 112
Option key / fieldMeaning and inputDefault
Character characterIdChoose a Character Designer ID; player is a runtime alias where supported.Blank
Waypoint Room sceneIdChoose a scene ID.Blank
Waypoint / Object (optional) waypointIdChoose an entity in the selected scene. May be blank.Blank
XYZ when no waypoint positionDestination/placement coordinates as [X, Y, Z].[0.0, 0.0, 0.0]
Ignore Navigation Mesh ignoreNavigationUse the direct route instead of following normal navigation constraints.false

Timing. Waits for the runtime routine to return; no further completion wait is promised by this schema.

Code example
await AddCharacterWaypoint({"characterId": "player", "sceneId": "lab", "waypointId": ""})

In use. Add three named markers around the room, then call Character Walk Waypoints. Ignore Navigation permits a direct route; keep it off for ordinary floor walking so obstacles and walkable areas remain meaningful.

Page 112 of 378Permalink
Go to page