Source.Python Dissolver!
-
- Developer
- Posts: 168
- Joined: Sat Jul 07, 2012 1:58 am
Source.Python Dissolver!
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.
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 1153 times
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
-
- Developer
- Posts: 168
- Joined: Sat Jul 07, 2012 1:58 am
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
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
https://github.com/satoon101/Dissolver
Put this to the imports in the header of dissolver.py:
Change Line 123 to this:
And replace <seconds> with the the number of seconds you want to delay the dissolving.
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.
I added this code in "Configuration"
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?
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?
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.
For your first issue, you need to use dissolver_delay.get_int() to get the current value of the ConVar.
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.

Who is online
Users browsing this forum: No registered users and 80 guests