Some weird speed glitch going on

So doing a thing, Giving Orisa a new “Power” mechanic: unlimited ammo, increased base movespeed and damage, but firing drains that boost. Using Ultimate funnels nearly all movespeed into damage and some other stuff. Damage and other stuff works right, but modifying the speed makes Orisa go bonkers fast. She returns to normal speed range when the ult period ends, which is weird.

Can anyone take a look at this? I’m working on it on my own, but everything is checking out from what I can see, it’s just not operating as it looks like it should.
Code: 6MH0K

Important bits:
ACTION - ONGOING - EACH PLAYER - ORISA
WAIT(.05, IGNORE CONDITION)
SET MOVESPEED(EVENT PLAYER, MULTIPLE(DIVIDE PLAYER VARIABLE, PLAYER A, 100), PLAYER VARIABLE(EVENT PLAYER, B)))
LOOP

takes current value of A (‘power’) , turns it into a percent, multiplies it by B (movespeed variable setup within player), sets it to that

ACTION - ONGOING - EACH PLAYER - ORISA
CONDITION: IS USING ULTIMATE(EVENT PLAYER) == TRUE && PLAYER VARIABLE D == FALSE
SET PLAYER VARIABLE (EVENT PLAYER, D, TRUE)
SET PLAYER VARIABLE(EVENT PLAYER, B, 5
WAIT(15, IGNORE CONDITION)
SET PLAYER VARIABLE(EVENT PLAYER, B, 120)
SET PLAYER VARIABLE (EVENT PLAYER, D, FALSE)
Using ult makes Orisa go zoomzoom, boosts damage, after 15 seconds orisa returns to normal. Speed is whack, yo.

I think you just mixed up with variables in the rule ‘Orisa: constant stat update’. As I can see in HUD, ‘Go’ (aka movement speed) calculating as (A / 100) * B but in the rule you’re using var B for damage and C for speed.
Check this code: ‘5DQ35’. It’s seemed to work fine here after I swaped these variables. I’ve also deleted one rule named ‘Orisa: attacking lowers Power’ because you had 2 of them. Sry for my engrish. Hope I helped you. :slight_smile:

oof. knew it was probably something silly. thanks

1 Like