SolvedMasking certain props

Posts 1–6 of 6 · Page 1 of 1
Masking certain props
When using util.TraceLine is it possible to add certain props to the mask? For example can I have
Code:
local los = {}
-- other info
los.mask = MASK_SHOT + (The prop that it should ignore)
local tr = util.TraceLine(los)
Or can you only use the mask and contents enums
Quote Originally Posted by isagrat View Post
When using util.TraceLine is it possible to add certain props to the mask? For example can I have
Code:
local los = {}
-- other info
los.mask = MASK_SHOT + (The prop that it should ignore)
local tr = util.TraceLine(los)
Or can you only use the mask and contents enums
you can only mask's and content enums

but what you can do is filter out props using filter in the trace structure

https://wiki.garrysmod.com/page/Structures/Trace

what you can do is just check the model name using https://wiki.garrysmod.com/page/Entity/GetModel

then filter it out

Code:
local los = {}

-- other shit
los.filter = function( ent ) if ( ent:GetModel() == "modelorsomething" ) then return false else return true end
or some shit
Quote Originally Posted by eth0s View Post
you can only mask's and content enums

but what you can do is filter out props using filter in the trace structure

https://wiki.garrysmod.com/page/Structures/Trace

what you can do is just check the model name using https://wiki.garrysmod.com/page/Entity/GetModel

then filter it out

Code:
local los = {}

-- other shit
los.filter = function( ent ) if ( ent:GetModel() == "modelorsomething" ) then return false else return true end
or some shit
nice

los.filter = function( ent ) return ( ent:GetModel() == "modelorsomething" )

??
Thanks bud didn't think of using filter
/thread
you need to call it in the main game thread.
1 week has passed and no further replies have been made by the OP. Assuming solved. @Jim Morrison

/Closed.
Posts 1–6 of 6 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us