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

FF2 Slowing down boss max speed for a rage?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
93SHADoW
AlliedModders Donor
Join Date: Jul 2014
Location: Houston, TX
Old 11-29-2014 , 14:09   Slowing down boss max speed for a rage?
Reply With Quote #1

I'm assuming FF2's Maxspeed overrides this, even if left blank:

Code:
SetEntPropFloat(Boss, Prop_Send, "m_flMaxspeed", 100.0),
For a rage i have, it was supposed to reduce the Boss's max speed to 100 for a timed duration, after that, it would then restore the Boss's max speed.

The slowdown attribute doesn't work on bosses neither.

What is another way that would work to temporarily reduce the speed for the duration of the rage?
__________________
93SHADoW is offline
Send a message via AIM to 93SHADoW Send a message via Skype™ to 93SHADoW
Wliu
Veteran Member
Join Date: Apr 2013
Old 11-29-2014 , 14:39   Re: Slowing down boss max speed for a rage?
Reply With Quote #2

Thank FF2's built-in 'Escape Plan' effect for that. You could probably set it on every game frame, but the better way would be just to edit the source code and remove the hardcoded speed.
__________________
~Wliu
Wliu is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 11-29-2014 , 23:39   Re: Slowing down boss max speed for a rage?
Reply With Quote #3

Should remove the whole maxspeed thing and set boss speed with tf2attributes
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 12-03-2014 , 04:52   Re: Slowing down boss max speed for a rage?
Reply With Quote #4

I made a suggestion months ago for a 4-line fix to add "no_speed_management" 0/1 as a parameter for the config file. I think it's ridiculous that it hasn't been included in 1.X. I know you guys want people to move to 2.X but hell, the moment 1.X gets abandoned I might just swoop in just to add optional overrides for undesirable features like 3x damage below 160 and FF2's mandatory speed management.

That said, it seems the absolute best place to override speed (especially if you're writing rages for someone else's server) in your boss' PreThink.

Example:
Code:
SDKHook(clientIdx, SDKHook_PreThink, MyPreThink);

public MyPreThink(clientIdx)
{
	// do a "player is alive" check here

	if (GetEntPropFloat(clientIdx, Prop_Send, "m_flMaxspeed") != MyCustomSpeedArray[clientIdx])
		SetEntPropFloat(clientIdx, Prop_Send, "m_flMaxspeed", MyCustomSpeedArray[clientIdx]);
}
Setting maxpseed in PreThink should prevent any race conditions with FF2, which just uses a looping timer.
I just do the if check since I don't know how smart the engine is with minimizing network traffic, i.e. a network variable is set to the same thing it was before. It's probably unnecessary.

Just remember to unhook it when the hale dies.
__________________

Last edited by sarysa; 12-03-2014 at 04:57.
sarysa is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 12-04-2014 , 15:17   Re: Slowing down boss max speed for a rage?
Reply With Quote #5

I have been thinking about the best way to do this; it just hasn't been at the top of my list.
I feel like allowing the config to set a speed formula (just like health) would be better than just "manage speed yes/no". Part of the problem is that I don't want to add something in 1.10 just to deprecate it as soon as v2 comes out (something similar happened to FF2_Get{Alive|Boss}Players just two minor versions after it was released...).
__________________
~Wliu
Wliu is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-04-2014 , 18:50   Re: Slowing down boss max speed for a rage?
Reply With Quote #6

The best way is to remove setting fl maxspeed, and use tf2 attributes. You onlu have to set the speed once on the client when you make them hale. It only depends what class they are so scale it appropriately, thats what i do.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 12-04-2014 at 18:50.
friagram is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 12-05-2014 , 11:32   Re: Slowing down boss max speed for a rage?
Reply With Quote #7

Wilu, the reason I recommend on/off is this will give people the ability to choose their own speed management style. Existing abilities that swap out weapons can be used to create two-speed hales (like my public DOTs) and even server operators who can't code to save their life can still make static speed hales.

The whole point of FF2 was to give people more control, and this oversight seems to go against that notion.

Though to be fair, now that I know about using PreThink, folks can use this info until it falls to the forum's second page. Honestly I only figured it out myself since I'm working on an "underwater arena" plugin where I have to use phatrages' PreThink water on the hale due to complications like sentries not targeting users with condition 86. FF2's speed sets get overriden by PreThink water.

(and yes, I plan on making my underwater arena code public, -after- I release Sea Pony ;P )
__________________

Last edited by sarysa; 12-05-2014 at 11:39.
sarysa is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-06-2014 , 06:56   Re: Slowing down boss max speed for a rage?
Reply With Quote #8

Quote:
Originally Posted by sarysa View Post
Wilu, the reason I recommend on/off is this will give people the ability to choose their own speed management style. Existing abilities that swap out weapons can be used to create two-speed hales (like my public DOTs) and even server operators who can't code to save their life can still make static speed hales.

The whole point of FF2 was to give people more control, and this oversight seems to go against that notion.

Though to be fair, now that I know about using PreThink, folks can use this info until it falls to the forum's second page. Honestly I only figured it out myself since I'm working on an "underwater arena" plugin where I have to use phatrages' PreThink water on the hale due to complications like sentries not targeting users with condition 86. FF2's speed sets get overriden by PreThink water.

(and yes, I plan on making my underwater arena code public, -after- I release Sea Pony ;P )
Yes but prethink only works well on client networked variables that are relevant to that client alone, because it depends on the clients commandrate. If they have it set to 22 or 33 or something, which is common, yet the server is running at 66, you are out of sync and not updating things as often as you could be. If this involves something other clients can experience then prethink can be a very poor choice. If a client drops frames, and misses thinks, or again has a low rate, you will see them studder ( like if you are teleporting a prop around on their think ). Gameframe will never fail in this regard.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 12-07-2014 , 07:55   Re: Slowing down boss max speed for a rage?
Reply With Quote #9

That's nice, but this is just m_flMaxspeed lol. It'll be fine.
__________________
sarysa is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-07-2014 , 08:32   Re: Slowing down boss max speed for a rage?
Reply With Quote #10

Or you can just use tf2attributes and it will be networked and client predicted... And be additive...
And you only have to set it once for each client at round start.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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:52.


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