AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [TF2] Making Syringe projectile shoot straight? (https://forums.alliedmods.net/showthread.php?t=234541)

nergal 02-01-2014 00:08

[TF2] Making Syringe projectile shoot straight?
 
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?

friagram 02-01-2014 04:49

Re: [TF2] Making Syringe projectile shoot straight?
 
sv_gravity 0

nergal 02-01-2014 13:38

Re: [TF2] Making Syringe projectile shoot straight?
 
Quote:

Originally Posted by friagram (Post 2093679)
sv_gravity 0

without affecting everybody/anything else....

Pelipoika 02-01-2014 13:50

Re: [TF2] Making Syringe projectile shoot straight?
 
SetEntityGravity it when it spawns?

Dr. Greg House 02-01-2014 14:10

Re: [TF2] Making Syringe projectile shoot straight?
 
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.

nergal 02-01-2014 15:29

Re: [TF2] Making Syringe projectile shoot straight?
 
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);



blodia 02-01-2014 15:39

Re: [TF2] Making Syringe projectile shoot straight?
 
try setting movetype to fly

nergal 02-01-2014 16:21

Re: [TF2] Making Syringe projectile shoot straight?
 
Quote:

Originally Posted by blodia (Post 2093938)
try setting movetype to fly

can you elaborate on that?

Oshizu 02-01-2014 17:18

Re: [TF2] Making Syringe projectile shoot straight?
 
Quote:

Originally Posted by nergal (Post 2093953)
can you elaborate on that?

PHP Code:

SetEntityMoveType(entityMOVETYPE_FLY


Chdata 02-01-2014 18:10

Re: [TF2] Making Syringe projectile shoot straight?
 
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')


All times are GMT -4. The time now is 21:49.

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