Garry's Mod Wiki

NPC:NavSetWanderGoal

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

Example

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

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

Page Links


Special Pages


Wikis

?

Render Time: 32ms

Session 0
DB GetPage 3
Generate Html 6
SaveChanges 8
Render Body 0
Render Sidebar 12