AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] It's Raining Men 0.1 (07/10) (https://forums.alliedmods.net/showthread.php?t=105546)

Jindo 10-05-2009 17:34

[TF2] It's Raining Men 0.1 (07/10)
 
3 Attachment(s)
It's Raining Men v0.1

Description: This plugin spawns ragdolls of random classes and teams at a height/distance defined by cvars, their spawning location is relative to a live player.

Screenshots:

http://labs.topaz-games.com/kj/image...stbowl0010.jpghttp://labs.topaz-games.com/kj/image...stbowl0011.jpg
http://labs.topaz-games.com/kj/image...stbowl0012.jpghttp://labs.topaz-games.com/kj/image...stbowl0014.jpg

---

Usage:

sm_rainmen: <optional target> - Activates Raining Men, if a target is not specified, the person running the command is used. (Use of @red/@blue/@all is highly discouraged if you want a nice and smooth running server), but just incase:

sm_rm_panic: - Removes all ragdolls and disables the plugin for 5 seconds.

sm_rm_stop: - Stops spawning ragdolls but doesn't remove previously spawned ragdolls.

Both of these commands require the ROOT admin flag, if there is a preference I'm happy to change it.

CVars: (Default settings should be safe (no insane lagging/crashes))

rainingmen_version: 0.1 - Current version of the plugin.
sm_rainmen_enable: 1 - Enable/Disable the plugin (1 = Enabled, 0 = Disabled)
rm_message_enable: 1 - Enable/Disable the "It's Raining Men" message
sm_rainmen_radius: 100.0 - Distance around the target to spawn ragdolls
sm_rainmen_height: 500.0 - Distance above the target to spawn ragdolls
sm_rainmen_frequency: 1 - Ragdolls to spawn per second (Anything higher than 10 is highly discouraged, higher than 5 discouraged on busy servers)
sm_rainmen_burn: 2 - Spawn burning ragdolls (0 = off, 1 = on, 2+ = random)
sm_rainmen_elec: 0 - Spawn electrocuted ragdolls (0 = off, 1 = on, 2+ = random)
sm_rainmen_remove: 6.0 - Time after a ragdoll has spawned in which it is removed.

So that above config:

Code:

sm_rainmen_enable    1
rm_message_enable 1
sm_rainmen_radius    100.0
sm_rainmen_height    500.0
sm_rainmen_frequency    1
sm_rainmen_burn        2
sm_rainmen_elec        0
sm_rainmen_remove    6.0

Should be safe on any server without lag issues. I managed to get as far as having a frequency of 20 without lag on an empty server, but on a full server it is not recommended.

If you do manage to lag your server to the point that it may crash (due to a high frequency setting most likely), you can use the aforementioned sm_rm_panic to kill the plugin temporarily and restore order.

The plugin can be used to have a trail of ragdolls following a player, or fall around them, or fall all over the place.

Code:

sm_rainmen_radius    2500.0
sm_rainmen_height    500.0

The above config would spawn ragdolls pretty much anywhere near to the player (feel free to increase the radius). You could also define the height and radius in map-specific configs to prevent ragdolls getting stuck in the ceilings on certain maps.

If I made this right, the plugin should auto-created a config containing the default values titled 'plugin.rainingmen.cfg' found in your cfg/sourcemod folder.

---

Version History:

  • Public release


TO DO:

  • Allow for control over the ragdolls' class/team skins
  • Tidy the code where necessary (if necessary)
  • Perhaps put a video together of it
  • Attach a default config
  • Add an additional argument to the sm_rainmen command to specify the duration of 'human precipitation' (where no argument = permanant until death).


---

I believe that's everything, enjoy the plugin, if there are any huge issues with it, I will attempt to correct them when I can (and of course if there is any thing I'm doing wrong in terms of general SourcePawn scripting, feel free to correct me!)

(The plugin has been tested and worked successfully on a Linux server running a 1.3 build, and a Windows server running a 1.2.4 build of Sourcemod)

Have fun!

emuzombie 10-05-2009 20:35

Re: [TF2] It's Raining Men 0.1 (05/10)
 
Haha, this looks great, can't wait to try it

retsam 10-05-2009 20:36

Re: [TF2] It's Raining Men 0.1 (05/10)
 
Very odd. :p

noodleboy347 10-05-2009 21:37

Re: [TF2] It's Raining Men 0.1 (05/10)
 
This looks cool, a bit strange. Does this lag the server at all, or cause FPS drop?

And the electric/burning thing looks interesting! Good job!

Jindo 10-06-2009 02:39

Re: [TF2] It's Raining Men 0.1 (05/10)
 
Thanks for the comments!

Quote:

Originally Posted by noodleboy347 (Post 953599)
This looks cool, a bit strange. Does this lag the server at all, or cause FPS drop?

As I said in the first post, certain settings (such as a frequency of 10 or higher) can cause massive FPS drop, but a low frequency (1-5) has proven safe on my 28 man server (while full).

If you do end up with a setting that's too high, I've added the sm_rm_panic command to stop spawning, remove all ragdolls and temporarily disable the plugin for 5 seconds.

Loading the plugin without a config file will leave you with the default settings, which are intended to be perfectly safe, if you're unsure of what settings to use, I recommend this.

Jamster 10-06-2009 06:05

Re: [TF2] It's Raining Men 0.1 (05/10)
 
Probably the best plugin on SM forums? I think so.

noodleboy347 10-06-2009 22:31

Re: [TF2] It's Raining Men 0.1 (05/10)
 
Just tried this, it's absolutely awesome! But there's no stop command, besides the panic.

Is it possible to change the starting animation? They always spawn in the default animation.

EDIT: Also, a convar to disable to center text? Please? It's funnier when ragdolls randomly start falling on people.

Jindo 10-07-2009 02:39

Re: [TF2] It's Raining Men 0.1 (05/10)
 
1 Attachment(s)
Quote:

Originally Posted by noodleboy347 (Post 954543)
Just tried this, it's absolutely awesome! But there's no stop command, besides the panic.

I'll add a command for this, glad it's working!

Quote:

Is it possible to change the starting animation? They always spawn in the default animation.
I'll look in to it. (No promises though)

Quote:

EDIT: Also, a convar to disable to center text? Please? It's funnier when ragdolls randomly start falling on people.
No problem at all.

---

I'll add those in later when I get time!

EDIT: This is untested, but I have no reason to believe that it shouldn't work!

Changes include:

  • Cvar rm_message_enable (0/1) to enable/disable the center text "It's Raining Men"
  • Command sm_rm_stop which stops the plugin briefly (without removing the ragdolls)
I'll update the plugin to v0.2 once I've got a few things sorted out.

Spazman0 10-09-2009 22:26

Re: [TF2] It's Raining Men 0.1 (07/10)
 
I think what noodleboy meant was that there is no way to stop it spawning on a certain person, unless the command is a toggle command, in which case can you specify? I'm gonna try to convince the server owner that I play on to load this on, it looks pretty cool.

Jindo 10-10-2009 07:40

Re: [TF2] It's Raining Men 0.1 (07/10)
 
Ah, so if you switch targets, the previous target is no longer used as a spawn point? I could do that.


All times are GMT -4. The time now is 03:23.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.