Bully-Board

Bully Modding Section => Script Modding => LUA Scripting Help => Topic started by: battlecats on November 24, 2021, 04:33:58 PM

Title: How to play a node after one finishes?
Post by: battlecats on November 24, 2021, 04:33:58 PM
As the subject says, I need help on figuring out how to make a node play after another one just finished. In the example below, I'm trying to make 3_05_Norton's taunt play after Norton finishes using his bearhug.

if PedIsPlaying(ped,"/Global/Actions/Grapples/Front/Grapples/GrappleMoves/BearHug",true) then
   repeat
      Wait(0)
   until not PedIsPlaying(ped,"/Global/Actions/Grapples/Front/Grapples/GrappleMoves/BearHug",true)
   PedSetActionNode(ped, "/Global/Norton/Offense/CombatTaunt/Taunt","Act/Anim/3_05_Norton.act")
end
Title: Re: How to play a node after one finishes?
Post by: SimonBestia on November 25, 2021, 11:08:27 AM
The way you're doing it seems to be fine.
Normally, I'd just do something like:
Code: [Select]
PedSetActionNode(ped, "/Global/Ambient/Scripted/Empty/EmptyNode/TrueEmptyNode", "Ambient.act")
   repeat
      Wait(0)
   until not PedIsPlaying(ped, "/Global/Ambient/Scripted/Empty/EmptyNode/TrueEmptyNode", "Ambient.act", true)
   PedSetActionNode(ped, "/Global/Ambient/Scripted/Empty/EmptyNode/TrueEmptyNode", "Ambient.act")
end
(I used basic nodes for the sake of the example.)
Title: Re: How to play a node after one finishes?
Post by: battlecats on November 25, 2021, 06:27:19 PM
I'm assume I should replace the PedSetActionNode at the top with PedIsPlaying(ped, [Node stuff here])?
Title: Re: How to play a node after one finishes?
Post by: SimonBestia on November 26, 2021, 03:29:26 AM
Not really unless you can't be certain he's already playing that animation.
I don't know what you're trying to do here.