Entity/ObjectCaps

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Documented function, we don't have the Lau enums tho, so a link to the github will do.)
(Note template)
 
Line 1: Line 1:
 
{{Func
 
{{Func
|Name=ObjectCaps
 
|Parent=Entity
 
 
|Description=Returns the entity's capabilities as a bitfield.<br>
 
|Description=Returns the entity's capabilities as a bitfield.<br>
 
In the engine this function is mostly used to check the use type, the save/restore system and level transitions flags.
 
In the engine this function is mostly used to check the use type, the save/restore system and level transitions flags.
Line 7: Line 5:
 
Even though the function is defined shared, it is not guaranteed to return the same value across states.
 
Even though the function is defined shared, it is not guaranteed to return the same value across states.
  
'''NOTE:'''The enums for this are not currently implemented in Lua, however you can access the defines [https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/shared/baseentity_shared.h#L21-L38 here].
+
{{Note|The enums for this are not currently implemented in Lua, however you can access the defines [https://github.com/ValveSoftware/source-sdk-2013/blob/55ed12f8d1eb6887d348be03aee5573d44177ffb/mp/src/game/shared/baseentity_shared.h#L21-L38 here].}}
 
|Realm=Shared
 
|Realm=Shared
 
|IsClass=Yes
 
|IsClass=Yes
 +
|Name=ObjectCaps
 +
|Parent=Entity
 
}}
 
}}
 
{{Ret
 
{{Ret

Latest revision as of 17:57, 28 April 2016

 Entity:ObjectCaps( )

Description

Returns the entity's capabilities as a bitfield.
In the engine this function is mostly used to check the use type, the save/restore system and level transitions flags.

Even though the function is defined shared, it is not guaranteed to return the same value across states.

NOTE

The enums for this are not currently implemented in Lua, however you can access the defines here.

Returns

number

The bitfield, a combination of the FCAP_ flags.
Personal tools
Navigation