NPC/NavSetWanderGoal

From Garry's Mod
Jump to: navigation, search
 NPC:NavSetWanderGoal( )

Contents

Description

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

Arguments

number xoffset

X offset

Arguments

number yoffset

Y offset

Examples

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


Personal tools
Navigation