NextBot/HandleStuck

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{Func |Name=HandleStuck |Parent=NextBot |Description=Called from Lua when the NPC is stuck. This should only be called from the behaviour coroutine - so if you want to ove...")
 
m (Links.)
 
(2 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
|Description=Called from Lua when the NPC is stuck. This should only be called from the behaviour coroutine - so if you want to override this function and do something special that yields - then go for it.
 
|Description=Called from Lua when the NPC is stuck. This should only be called from the behaviour coroutine - so if you want to override this function and do something special that yields - then go for it.
  
You should always call self.loco:ClearStuck() in this function to reset the stuck status - so it knows it's unstuck.
+
You should always call self.loco:ClearStuck() in this function to reset the stuck status - so it knows it's unstuck. See {{ClassFunction|CLuaLocomotion|ClearStuck}}.
|Realm=
+
|Realm=Server
 
|IsClass=Yes
 
|IsClass=Yes
|File_Name=gamemodes/base/entities/entities/base_nextbot/sv_nextbot.lua
+
|File=gamemodes/base/entities/entities/base_nextbot/sv_nextbot.lua
|File_Line=229
+
|Line=231
 
}}
 
}}

Latest revision as of 17:45, 26 January 2015

 NextBot:HandleStuck( )

Description

Called from Lua when the NPC is stuck. This should only be called from the behaviour coroutine - so if you want to override this function and do something special that yields - then go for it.

You should always call self.loco:ClearStuck() in this function to reset the stuck status - so it knows it's unstuck. See CLuaLocomotion:ClearStuck.

Personal tools
Navigation