So i was looking at: [url]https://wiki.garrysmod.com/page/halo/Add[/url]
And was wondering, does it always make the ents glow, i.e through walls, or just when you look at them (not through walls) as i want to add a glow to usable ents on my server.
Thanks.
if you read the 7th argument:
boolean ignoreZ=false
Renders the halo through anything when set to true.
What you are asking is toggled by argument number 7.
[editline]11th May 2016[/editline]
Of course, you have to keep in mind the PVS stuff.
[code] hook.Add( "PreDrawHalos", "AddHalos", function()
halo.Add( ents.FindByClass( "prop_physics*" ), Color( 255, 0, 0 ), 5, 5, 2 )
end )
[/code]
If i write this in lua/autorun, can i have more than just props. Or do i need to recode it for every ent (i assume that "prop_physics" is a list and i can add more via a comma?)
[QUOTE=Borris_Squad;50307813]
If i write this in lua/autorun, can i have more than just props. Or do i need to recode it for every ent (i assume that "prop_physics" is a list and i can add more via a comma?)[/QUOTE]
[CODE]hook.Add( "PreDrawHalos", "AddHalos", function()
local staff = {}
for k, v in pairs( player.GetAll() ) do
if string.find( v:Nick(), "Staff" ) then
table.insert( staff, v )
end
end
halo.Add( staff, Color( 0, 255, 0 ), 0, 0, 2, true, true )
end )
[/CODE]
[QUOTE=Borris_Squad;50307813][code] hook.Add( "PreDrawHalos", "AddHalos", function()
halo.Add( ents.FindByClass( "prop_physics*" ), Color( 255, 0, 0 ), 5, 5, 2 )
end )
[/code]
If i write this in lua/autorun, can i have more than just props. Or do i need to recode it for every ent (i assume that "prop_physics" is a list and i can add more via a comma?)[/QUOTE]
halo.Add takes a table of entities to draw the halo around. As long as you have an entity, halo.Add will work as intended.
Sorry, you need to Log In to post a reply to this thread.