Garry's Mod Wiki

Revision Difference

NPC:NavSetWanderGoal#510497

<function name="NavSetWanderGoal" parent="NPC" type="classfunc"> <description>Sets a goal in x, y offsets for the npc to wander to</description> <realm>Server</realm> <args> <arg name="xoffset" type="number">X offset</arg> <arg name="yoffset" type="number">Y offset</arg> </args> </function> <example> <description>Given an npc makes them wander to a location 100 units in both the x and y directions</description> <code> if npc:IsValid() then npc:NavSetWanderGoal(100, 100) npc:SetSchedule(SCHED_IDLE_WANDER) end </code> </example>