Page 1 of 1

[CS:GO] Check if entity is hidden to begin with

Posted: Sun Nov 25, 2018 5:43 pm
by velocity
How do I check if an entity is visible or not-visible for the player?

Re: [CS:GO] Check if entity is hidden to begin with

Posted: Mon Nov 26, 2018 3:40 am
by L'In20Cible
I'd say it depends of the entity. Most toggleable ones carry their own Boolean flag to whether or not they should think every frame.

Re: [CS:GO] Check if entity is hidden to begin with

Posted: Mon Nov 26, 2018 12:49 pm
by velocity
What about func_brush?

Re: [CS:GO] Check if entity is hidden to begin with

Posted: Mon Nov 26, 2018 2:28 pm
by L'In20Cible
Based on the SDK, func_brush is using an EntityEffects. Something like this should works:

Syntax: Select all

from entities.constants import EntityEffects

def is_func_brush_visible(brush):
return EntityEffects.NODRAW not in EntityEffects(brush.effects) # I don't fully remember if this should be .values or not here...

Re: [CS:GO] Check if entity is hidden to begin with

Posted: Mon Nov 26, 2018 8:39 pm
by velocity
That worked thanks. I have some follow up questions. Is it possible to get the entities associated with a button (without having to press it).

Re: [CS:GO] Check if entity is hidden to begin with

Posted: Tue Nov 27, 2018 2:34 am
by L'In20Cible
velocity wrote:That worked thanks. I have some follow up questions. Is it possible to get the entities associated with a button (without having to press it).

Please, create new threads. Makes the searches more efficient if unrelated questions are indexed separately.