Raised This Month: $12 Target: $400
 3% 

Replace knife in CS:S with HL2 Gravity Gun


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Damir
Member
Join Date: Jul 2006
Old 05-20-2007 , 07:44   Replace knife in CS:S with HL2 Gravity Gun
Reply With Quote #1

How can I make a script in cs:s, that will give admins the HL2 Gravity gun that makes it possible to throw and lift boxes, basically the same foundation as in HL2. It should replace knife...

Any ideas on how I should script this?
Damir is offline
el hippo
Member
Join Date: Jan 2006
Location: Texas
Old 05-20-2007 , 17:21   Re: Replace knife in CS:S with HL2 Gravity Gun
Reply With Quote #2

Setting cs:s gun models to something used in hl2 (such as the gravity gun) is not as easy as it sounds. I believe the player view model angles are different in cs:s which will cause guns to appear in weird places on the player body. You would have to recompile or manually readjust the physics and angles on the model.

The 'easiest' way to mimic the gravity gun, in my opinion, is to set velocities on an object by calculating how far it has to move to get to a certain point. This will require you to get the player's eyeangles along with using a traceline to find out what object they are grabbing. This may or may not be easy in the current version of SourceMod since the current version does not support calling of mod dependent vfuncs without the use of extensions.

If you just want to quickly get entity manipulation then look at my Entity Grabber plugin in the SourceMM plugins forum. Hopefully I won't get killed for advertising my plugin in the SourceMod forums.

Hippo
__________________
el hippo is offline
PhilC
Junior Member
Join Date: Nov 2006
Old 07-02-2007 , 07:21   Re: Replace knife in CS:S with HL2 Gravity Gun
Reply With Quote #3

a quick question, could you not hook the files for the grav gun from the sdk and then force them to load, this would then allow you to use a recompiled grav gun model as a view model and then in theory give you the functionality of the gravgun, but there ain't many props to through around ingame
PhilC is offline
Kaleid
New Member
Join Date: Jul 2007
Old 07-02-2007 , 12:59   Re: Replace knife in CS:S with HL2 Gravity Gun
Reply With Quote #4

That depends on if Valve removed the gravity gun from the CS:S source code or not (which they probably did).
Kaleid is offline
ferret
SourceMod Developer
Join Date: Dec 2004
Location: Atlanta, GA
Old 07-02-2007 , 13:25   Re: Replace knife in CS:S with HL2 Gravity Gun
Reply With Quote #5

The server will probably require turbophysics, if the gravgun is still in the code at all..
__________________
I'm a blast from the past!
ferret is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 07-02-2007 , 14:41   Re: Replace knife in CS:S with HL2 Gravity Gun
Reply With Quote #6

CS had a lot of the HL stuff left in because of the way the mod was made. CSS doesn't have things from HL2 (like NPC code and gravity gun code) left in.
L. Duke 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 15:22.


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