NPC.ConditionName

From GMod Wiki

Revision as of 12:39, 2 June 2011 by Chrisaster (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Function
Syntax NPC:ConditionName( Enum conditionID )
Description:
Converts a condition ID to a string.
Returns: String
In Object: Npc
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=NPC.ConditionName]NPC.ConditionName [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThis checks for the condition
Used onNewerServer.png
Code
function ENT:OnCondition( iCondition )
 
 
	if self:ConditionName(iCondition) == "COND_SEE_PLAYER" then		
 
		print("NPC sees Player")
 
	end
 
 
	--Msg( self, " Condition: ", iCondition, " - ", self:ConditionName(iCondition), "\n" )
 
end
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox