Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
TehPlayer14 opened this issue Apr 29, 2015 · 4 comments
Assignees
Milestone

Comments

@TehPlayer14
Copy link

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 ?

@winstliu
Copy link
Member

winstliu commented May 2, 2015

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 winstliu added this to the 2.0.0 milestone May 2, 2015
@winstliu winstliu self-assigned this May 2, 2015
@WildCard65
Copy link
Contributor

I may eventually need this also in the far future.

@shadow93
Copy link
Contributor

shadow93 commented May 4, 2015

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.

@winstliu
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants