[CS:GO] solid_flags not working

Please post any questions about developing your plugin here. Please use the search function before posting!
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

[CS:GO] solid_flags not working

Postby velocity » Wed Jan 23, 2019 12:06 am

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)
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [CS:GO] solid_flags not working

Postby L'In20Cible » Wed Jan 23, 2019 3:51 am

Syntax: Select all

entity.solid_flags = SolidFlags(entity.solid_flags & ~SolidFlags.NOT_SOLID)
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: [CS:GO] solid_flags not working

Postby velocity » Thu Jan 24, 2019 5:05 pm

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?
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [CS:GO] solid_flags not working

Postby L'In20Cible » Thu Jan 24, 2019 5:21 pm

Perhaps you want to play with these two keyvalues instead: https://github.com/alliedmodders/hl2sdk ... pp#L28-L29
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: [CS:GO] solid_flags not working

Postby velocity » Sat Jan 26, 2019 11:08 pm

I did:
entity.set_key_value_int("Solidity", 2)
entity.set_key_value_bool("solidbsp", False)

It did not work.
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: [CS:GO] solid_flags not working

Postby velocity » Sun Jan 27, 2019 5:17 pm

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
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Re: [CS:GO] solid_flags not working

Postby L'In20Cible » Mon Jan 28, 2019 1:36 am

What map is this? Got a download link and a test code?
User avatar
velocity
Senior Member
Posts: 220
Joined: Sat May 10, 2014 6:17 pm

Re: [CS:GO] solid_flags not working

Postby velocity » Fri Feb 01, 2019 6:51 pm

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.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 24 guests