Garry's Mod Wiki

Garry's Mod Wiki

  boolean NPC:NavSetWanderGoal( number xOffset, number yOffset )

Description

Sets a goal in x, y offsets for the NPC to wander to

Arguments

1 number xOffset
X offset
2 number yOffset
Y offset

Returns

1 boolean
Whether path generation was successful or not

Example

Given an NPC makes them wander to a location 100 units in both the x and y directions

if IsValid( npc ) then npc:NavSetWanderGoal( 100, 100 ) npc:SetSchedule( SCHED_IDLE_WANDER ) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...