keyvalue "filtername"

Please post any questions about developing your plugin here. Please use the search function before posting!
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

keyvalue "filtername"

Postby decompile » Tue Jul 26, 2016 4:21 pm

Hey,

Is it possible to add the keyvalue "filtername"? I havent found it yet.

On all triggers you can give them a filter (name) so it eg activates only if hes ct
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Re: keyvalue "filtername"

Postby satoon101 » Tue Jul 26, 2016 5:33 pm

That is already implemented in our entity data as filter_name:

https://github.com/Source-Python-Dev-Te ... er.ini#L13
Image
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: keyvalue "filtername"

Postby decompile » Tue Jul 26, 2016 5:56 pm

Thank you.

Oh damn, forgot to search it with "_" between it, gonna remind me that for next time.
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Re: keyvalue "filtername"

Postby Ayuto » Tue Jul 26, 2016 6:05 pm

Well, you can also search for the original name:
https://github.com/Source-Python-Dev-Te ... filtername

And in case a keyvalue hasn't been added yet, you can always access it using the get_key_value_<type>() method.
decompile
Senior Member
Posts: 416
Joined: Sat Oct 10, 2015 10:37 am
Location: Germany
Contact:

Re: keyvalue "filtername"

Postby decompile » Sat Mar 25, 2017 6:01 pm

Sorry for bumping older threads, but im having a problem with it. Its like if no filter was registered with the brush.

I tested it with creating a trigger with filtername through stripper which worked perfectly and simply copied it with source python and it doesnt.

I even tried printing the filternames of entities, but im getting utf8 error all the time, since it seems like to print bytes, maybe thats something related? Not sure, can send more when im home.

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 37 guests