FF2-Official icon indicating copy to clipboard operation
FF2-Official copied to clipboard

Not working custom abillity pack becuase of the speed check thats in ff2

Open TehPlayer14 opened this issue 9 years ago • 4 comments

Something like this won't work

BossSpeed is 170

new client2=GetClientOfUserId(FF2_GetBossUserId(boss)); SetEntDataFloat(client2, FindSendPropInfo("CTFPlayer", "m_flMaxspeed"), 400.0, true);

after working rage the speed was the same.

Will it be fixed some time ?

TehPlayer14 avatar Apr 29 '15 13:04 TehPlayer14

This one is especially tricky. FF2 doesn't allow maxspeed to be changed right now and it's going to take some work in order to get it to cooperate. You're not the only one who wants this; sarysa also needs it for a couple of abilities.

winstliu avatar May 02 '15 19:05 winstliu

I may eventually need this also in the far future.

WildCard65 avatar May 02 '15 22:05 WildCard65

I just use OnGameFrame as a workaround to this, and an array-based int and bool. That's how i do it for Female Heavy and Cave Johnson to adjust their move speed.

primitive, but works. Just remember to make a timer to reset the bool to false (whether an actual timer, or a tick via OnGameFrame using GetEngineTime() for the latter.)

new MoveSpeed[MAXPLAYERS+1];
new bool:MoveSpeedOverride[MAXPLAYERS+1];

public OnGameFrame()
{

    for(new i=1; i<=MaxClients; i++)
    {
        if(i<=MAXPLAYERS && i>0)
        {
            if(MoveSpeedOverride[i] && IsClientInGame(i) && IsPlayerAlive(i))
            {
                SetEntPropFloat(i, Prop_Send, "m_flMaxspeed", MoveSpeed[i]);
            }
        }
    }
}

I've been attempting to implement FF2_{Get|Set}BossMaxSpeed on my private FF2 fork.

While my implementation compiles, it will work at first but once it starts trying to adjust move speed, the boss is pretty much stuck there. The way i attempted it is similar to how FF2_{Get|Set}BossRageDamage is set up, except the move speed would return / set as a float instead of a regular integer.

shadow93 avatar May 04 '15 16:05 shadow93

BossSpeed is no longer scoped to the character itself and is now per-boss, so a tiny bit of progress has been made.

winstliu avatar Jun 20 '15 15:06 winstliu