Raised This Month: $ Target: $400
 0% 

Low gravity for objects L4D2


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Nano_Cell
Member
Join Date: Jan 2010
Old 02-16-2010 , 16:15   Low gravity for objects L4D2
Reply With Quote #1

Hey guys,

I have been looking about and have found nothing that seems to mention this so I thought if someone had a spare 5 minutes on their hands they might be able to knock this up or point me in the right direction for how to do it without a plug-in.

When changing the gravity on the server it only seems to affect players until level change at which point it affect objects in the level too, if sv_gravity is then changed back to the default of 800 the objects retain their low gravity till level change once again. Now personally I think all the objects being low gravity is awesome, I've had many people say it's very cool walking through the level with objects floating about and a bit creepy which is always good in a zombie game

Currently to get this working I change sv_gravity to 0.1 just before level change (0 tends to cause server to hang) and then change it back to 800 once the next level has loaded.

Sometimes I forget though which can be a pain, and if I change it to 0.1 too close to the server changing level the server also hangs, do you think this would be possible to be done in a plug-in? Unless there is a prettier or easier way to do this.

Thanks for any help guys

Last edited by Nano_Cell; 02-16-2010 at 16:17. Reason: Sorry I messed up the title a bit, should have put the "L4D2" at the beginning :(
Nano_Cell is offline
Cuthbert
Senior Member
Join Date: Nov 2009
Old 02-16-2010 , 18:16   Re: Low gravity for objects L4D2
Reply With Quote #2

That sounds pretty cool.

Unnecessary-bump.
Cuthbert is offline
Nano_Cell
Member
Join Date: Jan 2010
Old 02-16-2010 , 19:19   Re: Low gravity for objects L4D2
Reply With Quote #3

Do you live in the plug-in requests Cuthbert? lol

Another thing is that does add an extra level of difficulty due to med kits flying away etc if your not careful, is fun chasing your medkits round the room
Nano_Cell is offline
CanadaRox
Member
Join Date: Dec 2009
Old 02-17-2010 , 02:16   Re: Low gravity for objects L4D2
Reply With Quote #4

Pretty sure I've got a plugin to do this made up. I've tested versus and it works (and so should scavenge), but I'll test campaign mode tomorrow to make sure it works and then post the results.
CanadaRox is offline
Nano_Cell
Member
Join Date: Jan 2010
Old 02-17-2010 , 10:53   Re: Low gravity for objects L4D2
Reply With Quote #5

That's awesome cheers matey.
Nano_Cell is offline
CanadaRox
Member
Join Date: Dec 2009
Old 02-17-2010 , 16:46   Re: Low gravity for objects L4D2
Reply With Quote #6

This should work...

I tested it in Versus and Co-op. Probably has some negative side effects to the cans in scavenge (may float away as soon as they spawn, or just float away after you try to drop them). It pretty much just does exactly what you said, just sets sv_gravity 0.1 before a map change, and then puts it back to whatever you normally have set after the map changes. Also if you play versus, the infected that aren't locked after the round ends can fly around since it sets sv_gravity as soon as the second round ends.

Only one Cvar: l4d2_PropGrav_Enable 0|1 (defaults to 1) - Enable Low Gravity Props Plugin
Attached Files
File Type: sp Get Plugin or Get Source (propgrav.sp - 833 views - 2.7 KB)

Last edited by CanadaRox; 02-17-2010 at 18:09.
CanadaRox is offline
Nano_Cell
Member
Join Date: Jan 2010
Old 02-17-2010 , 17:19   Re: Low gravity for objects L4D2
Reply With Quote #7

Thanks for the upload mate but I don't seem to be able to compile this on any version of SM?
Nano_Cell is offline
CanadaRox
Member
Join Date: Dec 2009
Old 02-17-2010 , 17:37   Re: Low gravity for objects L4D2
Reply With Quote #8

Woops, I forgot the quotes when I changed the version to 1.0, should be fixed in 30s...
CanadaRox is offline
Nano_Cell
Member
Join Date: Jan 2010
Old 02-17-2010 , 19:07   Re: Low gravity for objects L4D2
Reply With Quote #9

So far seems to work fine, awesome stuff, thanks a bunch matey
Nano_Cell is offline
Nano_Cell
Member
Join Date: Jan 2010
Old 02-19-2010 , 19:12   Re: Low gravity for objects L4D2
Reply With Quote #10

Not sure if this is something that can be fixed but I might have to see if I can do it myself but I've noticed some items are not being affected by the low gravity that normally are, I'm wondering if the reason for this is where your plug-in changes the gravity back once the map has loaded on the server but before any one has loaded ( I assume this is true) but maybe if the plug-in could wait for the first player to load actually into the game before changing it back, but like I say I'll look into changing it

Last edited by Nano_Cell; 02-20-2010 at 06:59.
Nano_Cell is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:41.


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