I decided to just try and give jimmy a dodge. However I'm not 100% certain how to make him do actions when a button is pressed.
If I could find a Lua scripting tutorial for this kind of thing exactly it'd be helpful. all i ahve so far is somethin i pieced together from what i've read so far and reading a .lur file through HxD.
if PedGetTargetPed and BodyGuard and IsButtonPressed(7,0) then LoadAnimationGroup("P_Grappler") ExecuteActionNode(gPlayer, "/Global/P_Grappler_A/Defense/Evade/EvadeBack/Evade", "Act/Anim/P_Grappler_A.act") |
Pretty sure I'm missing some stuff though. Essentially I want jimmy to dodge when the Sprint button is pressed if the enemy is in an aggressive state and Jimmy is locked on.
Edit: now by using
if IsButtonPressed(10,0) and IsButtonPressed(7,0) then
LoadAnimationGroup("P_Striker") ExecuteActionNode(gPlayer, "/Global/P_Striker_B/Defense/Evade/EvadeBack/EvadeBack", "Globals/P_Striker_B.act")
I'm able to dodge, but now i just need to figure out how to disable it when not blocking, during grapples, while in hitstun, and while knocked down.