1
Modding Questions/Help / Re: Boss_Darby Action Nodes Concern
« 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.
I've tested it, and it works fine with targets.
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.