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

[TF2] TF2Attributes (v1.7.2, 2022/09/18)


Post New Thread Reply   
 
Thread Tools Display Modes
Wander
New Member
Join Date: Mar 2011
Location: The Netherlands
Old 03-30-2013 , 17:29   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #21

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
Wander is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 03-30-2013 , 20:15   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #22

Try TF2_AddCondition(client, TFCond_SpeedBuffAlly, 0.3); after you give the attribute. It's what VSH does to re-calculate move speed changes.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Wander
New Member
Join Date: Mar 2011
Location: The Netherlands
Old 03-30-2013 , 23:30   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #23

Quote:
Originally Posted by MasterOfTheXP View Post
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)
Wander is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 03-30-2013 , 23:48   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #24

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.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)

Last edited by MasterOfTheXP; 03-30-2013 at 23:48.
MasterOfTheXP is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 03-31-2013 , 07:49   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #25

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.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 03-31-2013 at 07:53.
FlaminSarge is offline
Dr. McKay
Sir Dr. SourceMod Plugin Approver Esq. Ltd. M.D. PhD
Join Date: Aug 2011
Location: Atlantis
Old 04-20-2013 , 22:36   Re: [TF2] TF2Attributes (v1.0.0, 03/08/2013)
Reply With Quote #26

<3
__________________
Dr. McKay is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 04-24-2013 , 03:16   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #27

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.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 04-24-2013 at 03:19.
FlaminSarge is offline
Unreal1
AlliedModders Donor
Join Date: Dec 2010
Old 04-27-2013 , 18:03   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #28

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?
Unreal1 is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 04-29-2013 , 15:40   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #29

With SteamPipe due tomorrow and me just releasing a plugin that uses TF2Attributes... what's the status on SteamPipe gamedata?
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
FlaminSarge
Veteran Member
Join Date: Jul 2010
Old 04-30-2013 , 08:28   Re: [TF2] TF2Attributes (v1.0.1, 04/24/2013)
Reply With Quote #30

My sig tells all.

I'll look it up some time tomorrow.

Not sure about the x2everything thing.
__________________
Bread EOTL GunMettle Invasion Jungle Inferno will break everything. Don't even ask.

All plugins: Randomizer/GiveWeapon, ModelManager, etc.
Post in plugin threads with questions.
Steam is for playing games.
You will be fed to javalia otherwise.
Psyduck likes replays.

Last edited by FlaminSarge; 04-30-2013 at 08:28.
FlaminSarge 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 13:44.


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