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

[TF2] Making Syringe projectile shoot straight?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
nergal
Veteran Member
Join Date: Apr 2012
Old 02-01-2014 , 00:08   [TF2] Making Syringe projectile shoot straight?
Reply With Quote #1

I asked a question like this to Flamin' Sarge eons ago, but that was back when I had no knowledge of sourcepawn at all.

And his original PM of it has mysteriously disappeared, much to my chagrin :\

so I would like to ask, how to make syringe gun shoot straight?
__________________
nergal is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 02-01-2014 , 04:49   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #2

sv_gravity 0
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 02-01-2014 , 13:38   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #3

Quote:
Originally Posted by friagram View Post
sv_gravity 0
without affecting everybody/anything else....
__________________
nergal is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 02-01-2014 , 13:50   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #4

SetEntityGravity it when it spawns?
Pelipoika is offline
Dr. Greg House
Professional Troll,
Part-Time Asshole
Join Date: Jun 2010
Old 02-01-2014 , 14:10   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #5

Use DHooks to detour "GetProjectileGravity".

EDIT:
Code:
 222  221 CTFProjectile_Syringe::GetGravity(void)
First one is for linux, second is for windows.
Returns a float.
__________________
Santa or Satan?

Watch out when you're paying people for private requests! Most stuff already exists and you can hardly assess the quality of what you'll get, and if it's worth the money.
Dr. Greg House is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 02-01-2014 , 15:29   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #6

will this work?

PHP Code:
public OnEntityCreated(entity, const String:classname[]) //syringe gun redo
{
    
SDKHook(entitySDKHook_SpawnHook_EntitySpawned);
}
public 
Hook_EntitySpawned(entity)
{
    if (
entity == tf_projectile_syringe)
        
SetEntityGravity(entity0.1);

__________________

Last edited by nergal; 02-01-2014 at 15:31.
nergal is offline
blodia
Veteran Member
Join Date: Sep 2009
Location: UK
Old 02-01-2014 , 15:39   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #7

try setting movetype to fly
blodia is offline
nergal
Veteran Member
Join Date: Apr 2012
Old 02-01-2014 , 16:21   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #8

Quote:
Originally Posted by blodia View Post
try setting movetype to fly
can you elaborate on that?
__________________
nergal is offline
Oshizu
Veteran Member
Join Date: Nov 2012
Location: Warsaw
Old 02-01-2014 , 17:18   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #9

Quote:
Originally Posted by nergal View Post
can you elaborate on that?
PHP Code:
SetEntityMoveType(entityMOVETYPE_FLY
__________________
...

Last edited by Oshizu; 02-01-2014 at 17:18.
Oshizu is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 02-01-2014 , 18:10   Re: [TF2] Making Syringe projectile shoot straight?
Reply With Quote #10

entity == tf_projectile_syringe

Won't work, GetEntityClassName then check if it's "tf_projectile_syringe"

You could probably get away with

(s[15] == 'y')
__________________
Chdata 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 03:17.


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