Page 1 of 1

[CS:GO] solid_flags not working

Posted: Wed Jan 23, 2019 12:06 am
by velocity
I'm trying to make a func_brush solid by code. And no, changing the solid_flags to SolidFlags.NOT_MOVEABLE won't work with all func_brushes, because for some reason collisions can still be disabled.

Syntax: Select all

@OnEntitySpawned
def on_entity_spawned(base_entity):
classname = base_entity.classname
entity = Entity(base_entity.index)

entity.solid_flags &= ~SolidFlags.NOT_SOLID



But I get the following error:

Code: Select all

File "../addons/source-python/plugins/aea/region_phase.py", line 666, in on_entity_spawned

entity.solid_flags &= ~SolidFlags.NOT_SOLID

File "../addons/source-python/packages/source-python/entities/_base.py", line 125, in __setattr__

object.__setattr__(self, attr, value)



Boost.Python.ArgumentError: Python argument types in

None.None(Entity, int)

did not match C++ signature:

None(CBaseEntityWrapper {lvalue}, SolidFlags_t)

Re: [CS:GO] solid_flags not working

Posted: Wed Jan 23, 2019 3:51 am
by L'In20Cible

Syntax: Select all

entity.solid_flags = SolidFlags(entity.solid_flags & ~SolidFlags.NOT_SOLID)

Re: [CS:GO] solid_flags not working

Posted: Thu Jan 24, 2019 5:05 pm
by velocity
Thanks that fixed the error, but apparently the func_brush collisions are still disabled and I wonder why? It is a func_brush connected to a trigger_multiple, when you enter the trigger_multiple it sends the output "Toggle" which enables collisions on the func_brush. Is it possible to enable collisions for the func_brush without call_input?

Re: [CS:GO] solid_flags not working

Posted: Thu Jan 24, 2019 5:21 pm
by L'In20Cible
Perhaps you want to play with these two keyvalues instead: https://github.com/alliedmodders/hl2sdk ... pp#L28-L29

Re: [CS:GO] solid_flags not working

Posted: Sat Jan 26, 2019 11:08 pm
by velocity
I did:
entity.set_key_value_int("Solidity", 2)
entity.set_key_value_bool("solidbsp", False)

It did not work.

Re: [CS:GO] solid_flags not working

Posted: Sun Jan 27, 2019 5:17 pm
by velocity
I took a screenshot from Hammer, if this could be of any help


The func_brush
https://gyazo.com/dda5f5813c8112466bd68fcdb6b782f0

The trigger_multiple
https://gyazo.com/bb3129736361a2e784e72ce9f7c5330c

Re: [CS:GO] solid_flags not working

Posted: Mon Jan 28, 2019 1:36 am
by L'In20Cible
What map is this? Got a download link and a test code?

Re: [CS:GO] solid_flags not working

Posted: Fri Feb 01, 2019 6:51 pm
by velocity
After a lot of testing, I just ended up by sending input "Enable" on entity spawn. It's a custom map if I need further help I will put a test code and download link.