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

TFCond for slowing needs a weapon switch to update


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Borlea
Junior Member
Join Date: May 2014
Old 07-17-2015 , 03:55   TFCond for slowing needs a weapon switch to update
Reply With Quote #1

I'm slowing people using the TFCond_Slowed, and it adds to the client all fine.. but after it gets removed when the duration is over you need to switch weapons or do something like cloak/disguise and couple other things for it to actually go away. I'm trying to find a way to "update" the client so it gets removed without any disturbance but can't find a way. Or even just an alternative way to slow players would be nice too.

The way I'm doing it is as follows:
TF2_AddCondition(client, TFCond_Slowed, float(3));

I've done a bunch of research and conditions are the only way I can find to slow people.. And the slowing one is the only one with the issue of needing an "update" to be removed.

I attempted to create a timer to quickly switch to a random slot and back but it seems to happen too fast that switching back doesn't work(But the weapon switch does remove the slow effect)

Thanks in advance.. Still pretty nooby at sourcemod.. But I tried my best at doing the research and attempting things on my own before posting.
Borlea is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 07-17-2015 , 08:54   Re: TFCond for slowing needs a weapon switch to update
Reply With Quote #2

float(3)

or you could

3.0

you can use m_flMaxSpeed to slow people seamlessly by setting it once. it'll be overwritten whenever the player weapon switches or is affected by anything else that affects speed, so you'll probably want to keep resetting it on a timer or every frame.
__________________
Chdata is offline
Tylerst
Veteran Member
Join Date: Oct 2010
Old 07-17-2015 , 10:00   Re: TFCond for slowing needs a weapon switch to update
Reply With Quote #3

I use this for my Set Speed plugin when I need to update player speed. Works fine.

PHP Code:
TF2_StunPlayer(client0.00.0TF_STUNFLAG_SLOWDOWN); 

Last edited by Tylerst; 07-17-2015 at 10:00.
Tylerst is offline
pheadxdll
AlliedModders Donor
Join Date: Jun 2008
Old 07-17-2015 , 11:22   Re: TFCond for slowing needs a weapon switch to update
Reply With Quote #4

Something like this may help:
Code:
TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.01);
__________________
pheadxdll is offline
Benoist3012
Veteran Member
Join Date: Mar 2014
Location: CWave::ForceFinish()
Old 07-17-2015 , 15:44   Re: TFCond for slowing needs a weapon switch to update
Reply With Quote #5

Quote:
Originally Posted by pheadxdll View Post
Something like this may help:
Code:
TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.01);
Well you heard a sound of speed, if he want to do quietly stun is better
__________________
Benoist3012 is offline
Reply


Thread Tools
Display Modes

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 11:15.


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