Bully-Board

Bully Modding Section => Modding Questions/Help => Topic started by: DrianYu22 on December 02, 2023, 05:50:49 AM

Title: Boss_Darby Action Nodes Concern
Post by: DrianYu22 on December 02, 2023, 05:50:49 AM
Hello guys could you help me with these nodes? it seems they can't be executed in-game

"/Global/BOSS_Darby/Defense/Evade/EvadeLeft/HeavyAttacks/EvadeRightPunch","act/anim/BOSS_Darby.act"

"/Global/BOSS_Darby/Defense/Evade/EvadeRight/HeavyAttacks/EvadeLeftPunch","act/anim/BOSS_Darby.act"

You guys response would be greatly appreciated  :)
Title: Re: Boss_Darby Action Nodes Concern
Post by: Yunyv on January 15, 2024, 06:58:36 AM
(machine translation)
This function may be helpful to you,I found this function in a mod made by mh_dt/mhdt ,I didn't make it.
Code: [Select]
forceActionNode = function(gplayer,node,tree)
local playing
local attempts = 0
repeat
PedSetActionNode(gplayer,"/Global","Act/Globals.act")
PedSetActionNode(gplayer,node,tree)
playing = (PedIsPlaying(gplayer,node,false) or PedIsPlaying(gplayer,node,true)) and PedGetNodeTime(gplayer) == 0
attempts = attempts + 1
until playing or attempts == 100
return playing,attempts
end
How to use:example:
Code: [Select]
forceActionNode(gplayer,"/Global/BOSS_Darby/Defense/Evade/EvadeLeft/HeavyAttacks/EvadeRightPunch","act/anim/BOSS_Darby.act")I found this function in a mod made by mh_dt/mhdt ,I didn't make it.
I've tested it, and it works fine with targets.