Entity.SetRenderMode

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:SetRenderMode( Integer rendermode )
Description:
Sets the render mode the entity uses. The render mode should correspond to a render mode enumeration.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetRenderMode]Entity.SetRenderMode [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionEntity you're pointing at starts to glow( if you're pointing at an entity )
Used onNewerShared.png
Code
 
local trace = Player:GetEyeTrace();
if( not trace.HitWorld and IsValidEntity( trace.Entity ) ) then // if you hit an entity
  trace.Entity:SetRenderMode( RENDERMODE_GLOW )
end
 
OutputN/A


See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox