Source.Python Dissolver!

Release your plugins here!
your-name-here
Developer
Posts: 168
Joined: Sat Jul 07, 2012 1:58 am

Source.Python Dissolver!

Postby your-name-here » Sun Mar 08, 2015 9:45 pm

Hi guys, just wanted to release a really simple plugin showcasing the entities and config APIs.

Current version: 1.0
Supported games: Counter-Strike: Source (may also work on CS:GO).
Description: This plugin causes player's ragdolls to dissolve on player death.

Configuration: The plugin creates a configuration file under <modname>/cfg/source-python/sp_dissolver.cfg. See the configuration file for a description of what you can change.
Attachments
dissolver.zip
(1.8 KiB) Downloaded 554 times
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Mar 08, 2015 10:05 pm

Nice!! I just tested and it does work for CS:GO. However, the effects are not the same. Actually, there is really no "effect" in the way of sparks/flashiness, but the entity does get removed.
Image
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Sun Mar 08, 2015 10:11 pm

Awesome! You could get it working on TF2 as well using tf_ragdoll on that game. Also, I wonder if EntityFlags.KEEP_ON_RECREATE_ENTITIES could be useful here. :)
your-name-here
Developer
Posts: 168
Joined: Sat Jul 07, 2012 1:58 am

Postby your-name-here » Sun Mar 08, 2015 10:15 pm

Unfortunately, you have to recreate the dissolver every round because CSS strips everything. It does not look at the KEEP_ON_RECREATE_ENTITIES flag :P
User avatar
L'In20Cible
Project Leader
Posts: 1533
Joined: Sat Jul 14, 2012 9:29 pm
Location: Québec

Postby L'In20Cible » Sun Mar 08, 2015 10:19 pm

Too bad, then. I noticed that flag yesterday and thought about it when I saw your comments about recreation. :D
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Fri Sep 25, 2015 11:04 am

Hello,

after install the plugin, I have this error :

The attachment dissolver.jpg is no longer available


Can you help me please?

Thanks
Attachments
dissolver.jpg
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Fri Sep 25, 2015 1:36 pm

A lot has changed since this was released. I have a new version I will release soon that supports more games. I have already asked ynh if it was ok if I did, and he encouraged it. You can find the current version here:
https://github.com/satoon101/Dissolver
Image
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Sat Sep 26, 2015 3:03 pm

Thanks satoon, it works :)
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Fri Oct 02, 2015 12:00 pm

Is it possible to add a timer before dissolving, with a value in the cfg file?

Thanks
stonedegg
Senior Member
Posts: 141
Joined: Sun Aug 12, 2012 11:45 am

Postby stonedegg » Fri Oct 02, 2015 2:14 pm

Put this to the imports in the header of dissolver.py:

Syntax: Select all

from listeners.tick import tick_delays

Change Line 123 to this:

Syntax: Select all

tick_delays.delay(<seconds>, dissolver_entity.dissolve, ragdoll_classname)

And replace <seconds> with the the number of seconds you want to delay the dissolving.
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Fri Oct 02, 2015 2:28 pm

I can add that to the plugin with a ConVar when I get the chance. Good suggestion, thank you.
Image
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Fri Oct 02, 2015 4:44 pm

I added this code in "Configuration"

Syntax: Select all

# Create the dissolver delay cvar
dissolver_delay = _config.cvar(
'delay', 2, ConVarFlags.NONE,'Delay before dissolving')


stonedegg wrote:Put this to the imports in the header of dissolver.py:

Syntax: Select all

from listeners.tick import tick_delays


Change Line 123 to this:

Syntax: Select all

tick_delays.delay(<seconds>, dissolver_entity.dissolve, ragdoll_classname)

And replace <seconds> with the the number of seconds you want to delay the dissolving.


Done. I have replaced <seconds> by "dissolver_entity.dissolve_delay". But if I change the value in the cfg file (5, to have a long time to see the difference), it seems to don't work, it keeps 2 seconds...

And if two people are killed with an interval of 1 second, they are dissolved at the same moment.

Any idea?
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Fri Oct 02, 2015 5:30 pm

I will update the script to accommodate for that last issue. The dissolver entity dissolves using the entity classname/targetname. I will have to do some testing to make sure I do it right. Give me some time, though, as I am fairly busy for the next week or two.

For your first issue, you need to use dissolver_delay.get_int() to get the current value of the ConVar.
Image
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Fri Oct 02, 2015 5:50 pm

No problem, take your time :)

Tell us here when you do the upgrade.
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Tue Feb 02, 2016 3:40 pm

Hello Satoon101,

I have this problem now :
The attachment Dissolver.jpg is no longer available


Can you resolve it please?

And if you can add a timer, it will be great :)

Thanks.
Attachments
Dissolver.jpg
User avatar
Ayuto
Project Leader
Posts: 2193
Joined: Sat Jul 07, 2012 8:17 am
Location: Germany

Postby Ayuto » Tue Feb 02, 2016 4:12 pm

Development status update (December 2015) wrote:ConVar creation changes.

http://forums.sourcepython.com/showthread.php?1037-Development-status-update-%28December-2015%29

At least nobody can tell me we haven't documented all these changes. :D
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Wed Feb 03, 2016 2:02 am

I will fix this shortly and create a new thread for my version.
Image
Jerome69
Member
Posts: 82
Joined: Wed Sep 23, 2015 3:20 pm

Postby Jerome69 » Tue Feb 09, 2016 11:55 am

I tried to make change but it doesn't work...

I will wait for your update and your own post satoon :)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Feb 09, 2016 1:18 pm

Sorry for the delay. I encountered something during my re-write which requires a bit of updating in SP itself. We are working on making those changes, then I will release the new version.
Image

Return to “Plugin Releases”

Who is online

Users browsing this forum: No registered users and 42 guests