AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] TF2Attributes (v1.7.2, 2022/09/18) (https://forums.alliedmods.net/showthread.php?t=210221)

Wander 03-30-2013 17:29

Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
 
Just started using this in my mod, but I ran into a small problem

At some point I want to change the players speed, so I tried this:
TF2Attrib_SetByName(client,"move speed penalty",0.5);

However, it only takes effect after the client switches weapon
I've also tried some other tf2 attributes that affect speed, and they seem to have the same problem

Is there a way to fix it, or should I somehow change the players active weapon slot to something else and back?
This might be happening at a point where the player only has a melee weapon, so I don't know if it'd work then

MasterOfTheXP 03-30-2013 20:15

Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
 
Try TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.3); after you give the attribute. It's what VSH does to re-calculate move speed changes.

Wander 03-30-2013 23:30

Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
 
Quote:

Originally Posted by MasterOfTheXP (Post 1923480)
Try TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.3); after you give the attribute. It's what VSH does to re-calculate move speed changes.

Thanks :) that seems to do the trick (though I changed 0.3 to 0.001 to hide the onscreen indicator)

MasterOfTheXP 03-30-2013 23:48

Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
 
Oh, is 0.3 too much? Whoops. I knew there was a duration you could use that wouldn't cause any visual effects, but I was pretty sure that 0.3 wouldn't show anything. My bad.

FlaminSarge 03-31-2013 07:49

Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
 
The upcoming ClearCache native may or may not also do the trick, but VSH does not in fact use 0.3 (it does for Medic healing speed but that's moot).
Code:

        TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.01);    //recalc their speed
I have this line copypasted in so many plugins...


... I really should just push that ClearCache change.

Dr. McKay 04-20-2013 22:36

Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
 
<3

FlaminSarge 04-24-2013 03:16

Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
 
Updated on 04/24/2013 for ClearCache and GetByDefIndex.

Please read the notes next to ClearCache in the .inc file, as it tells you when you may/may not need to use it.

Unreal1 04-27-2013 18:03

Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
 
I was wondering if it would be possible to make it so that you multiply all the attributes of a weapon by 2. I was thinking of using a large loop but I think that would be too intense. Got any other methods?

Powerlord 04-29-2013 15:40

Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
 
With SteamPipe due tomorrow and me just releasing a plugin that uses TF2Attributes... what's the status on SteamPipe gamedata?

FlaminSarge 04-30-2013 08:28

Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
 
My sig tells all.

I'll look it up some time tomorrow.

Not sure about the x2everything thing.


All times are GMT -4. The time now is 14:20.

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