Entity.SetColor

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:SetColor( Integer red, Integer green, Integer blue, Integer alpha or Color color β )
Description:
Sets the color of the entity.
Returns: nil
In Object: Entity
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.SetColor]Entity.SetColor [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionDoes a loop through every entity in the game, and makes it red.
Used onNewerShared.png
Code
for k, v in pairs( ents.GetAll() ) do
	v:SetColor(255, 0, 0, 255) 
end
OutputEvery entity is now red. Props, Vehicles, Players etc.


Additional notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox