News: Welcome back to Bullworth! If you haven't already, you will need to reset your password..


Author Topic: Restore beta moves  (Read 1729 times)

0 Members and 1 Guest are viewing this topic.

Offline UmaruChan223

  • Newbie
  • *
  • Posts: 1
    • View Profile
Restore beta moves
« on: March 23, 2022, 01:32:38 AM »
I want to restore some kind of beta or unused moves such as tornado kick for G_Johnny or shoulder barge for J_Melee
Pls help people

Offline J_Striker_A

  • Jr. Member
  • **
  • Posts: 29
    • View Profile
Re: Restore beta moves
« Reply #1 on: March 23, 2022, 12:29:43 PM »
"/Global/G_Johnny/Default_KEY/RisingAttacks/HeavyAttacks/RisingAttacks", "Act/Anim/G_Johnny.act"(tornado Kick)
"/Global/J_Melee_A/Offense/Medium/Strikes/Unblockable/ShoulderButt", "act/anim/J_Melee_A.act"(shoulder Barge)

Offline Altamurenza

  • Full Member
  • ***
  • Posts: 118
  • Gender: Male
  • I love cheat, unique, realistic, & expansion mod.
    • View Profile
Re: Restore beta moves
« Reply #2 on: March 23, 2022, 09:49:01 PM »
You can use the code provided by J_Striker_A on this script, you may also change the code to suit your needs.
BTW.. this is only for Johnny:
Code: [Select]
X, Y, Z = PlayerGetPosXYZ()

if PedIsModel(ped, 23) then
  if PedMePlaying(ped, "Default_KEY") then
    if not PedIsPlaying(ped, "/Global/G_Johnny", true) then
      PedSetActionTree(ped, "/Global/G_Johnny", "Act/Anim/G_Johnny.act")
    end
   
    if PedIsValid(PedGetTargetPed(ped)) and PedIsInCombat(ped) then
      local PX, PY, PZ = PedGetPosXYZ(ped)
      if math.abs(X - PX) + math.abs(Y - PY) + math.abs(Z - PZ) <= 2.0 and math.random(1, 100) < 5 then
        PedSetActionNode(ped, node, file) -- replace node and file with J_Striker_A's action nodes or your own ones
      end
    end
  end
end

That is how you can trigger NPC to do a custom attack animation simply and looks naturally. The chance of doing that animation is 5% (math.random(1, 100) < 5), i personally don't recommend you to set the chance higher than 20. Otherwise, it will be his favorite moves :laugh:.

Disclaimer: I did not test the code, but it was modified according to the attached picture.

Offline battlecats

  • I can only mod Ide.img and pedstats.dat
  • Jr. Member
  • **
  • Posts: 11
  • Gender: Male
  • Feel Good .Inc
    • View Profile
Re: Restore beta moves
« Reply #3 on: April 13, 2022, 07:57:15 PM »
You can also add PedMePlaying(ped,"StrafeIdle") on the "if PedIsValid(PedGetTargetPed(ped)) and PedIsInCombat(ped) then" line to make it so they only use the attack when doing their strafe idle, which is when the ai usually attacks.