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


Author Topic: Action node taking a while to execute  (Read 2236 times)

0 Members and 1 Guest are viewing this topic.

Offline hereareyou

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Action node taking a while to execute
« on: August 30, 2021, 05:39:11 PM »
I recently made a simple lua and when I try to execute the action node it doesn't work. I have to press the buttons more than once. Otherwise it doesn't work. Here, take a look at the code:

Code: [Select]
function MissionSetup()
  AreaTransitionXYZ(0, 270, -110, 7)
  PlayerSetHealth(1000)
end

function MissionCleanup()
  gMissionRunning = false
  collectgarbage()
end

function main()
  gMissionRunning = true
  while gMissionRunning do
    TL_Buttons()
LoadAllAnim()
    Wait(0)
  end
end

function LoadAllAnim()
  LoadAnimationGroup("1_02BYourSchool")
  LoadAnimationGroup("1_02_MeetWithGary")
  LoadAnimationGroup("1_03The Setup")
  LoadAnimationGroup("1_04TheSlingshot")
  LoadAnimationGroup("1_06ALittleHelp")
  LoadAnimationGroup("1_07_SaveBucky")
  LoadAnimationGroup("1_07_Sk8Board")
  LoadAnimationGroup("1_08ThatBitch")
  LoadAnimationGroup("1_08_MandPuke")
  LoadAnimationGroup("1_09_Candidate")
  LoadAnimationGroup("1_10Betrayal")
  LoadAnimationGroup("1_11B_HeBigPrank")
  LoadAnimationGroup("1_G1_TheDiary")
  LoadAnimationGroup("1_S01HatVsGall")
  LoadAnimationGroup("2_01LastMinuteShop")
  LoadAnimationGroup("2_02ComicKlepto")
  LoadAnimationGroup("2_05TadsHouse")
  LoadAnimationGroup("2_06MovieTickets")
  LoadAnimationGroup("2_07BeachRumble")
  LoadAnimationGroup("2_08WeedKiller")
  LoadAnimationGroup("2_4RichAreaRace")
  LoadAnimationGroup("2_G2CarnivalDate")
  LoadAnimationGroup("2_G2_GiftExchange")
  LoadAnimationGroup("2_R03PaperRoute")
  LoadAnimationGroup("2_S02CharSheets")
  LoadAnimationGroup("2_S04CharSheets")
  LoadAnimationGroup("2_S05_CooksCrush")
  LoadAnimationGroup("2_S06PantyRaid")
  LoadAnimationGroup("3_01JealousJohnny")
  LoadAnimationGroup("3_04WrongPtTown")
  LoadAnimationGroup("3_05TheTenements")
  LoadAnimationGroup("3_BFightJohnnyV")
  LoadAnimationGroup("3_G3")
  LoadAnimationGroup("3_R05ChemicalDeliv")
  LoadAnimationGroup("3_R08RaceLeague")
  LoadAnimationGroup("3_S03CheatinTime")
  LoadAnimationGroup("4_01Paparazzi")
  LoadAnimationGroup("4_04_FunhouseFun")
  LoadAnimationGroup("4_06BigGame")
  LoadAnimationGroup("4_B2_JockBossBattle")
  LoadAnimationGroup("5_01Grp")
  LoadAnimationGroup("5_01Rats")
  LoadAnimationGroup("5_02PrVandalized")
  LoadAnimationGroup("5_05Zoe")
  LoadAnimationGroup("5_09MakingAMark")
  LoadAnimationGroup("6B_PARA")
  LoadAnimationGroup("AGymLght")
  LoadAnimationGroup("Ambient")
  LoadAnimationGroup("Ambient2")
  LoadAnimationGroup("Ambient3")
  LoadAnimationGroup("ANIBBALL")
  LoadAnimationGroup("AniBroom")
  LoadAnimationGroup("AniDice")
  LoadAnimationGroup("AniFooty")
  LoadAnimationGroup("AniGlobe")
  LoadAnimationGroup("AnimSave")
  LoadAnimationGroup("AniPillo")
  LoadAnimationGroup("ARC3D")
  LoadAnimationGroup("Area_Asylum")
  LoadAnimationGroup("Area_Funhouse")
  LoadAnimationGroup("Area_GirlsDorm")
  LoadAnimationGroup("Area_Infirmary")
  LoadAnimationGroup("Area_School")
  LoadAnimationGroup("Area_Tenements")
  LoadAnimationGroup("Armor")
  LoadAnimationGroup("AsyBars")
  LoadAnimationGroup("AsyDoorB")
  LoadAnimationGroup("AsyDoors")
  LoadAnimationGroup("AsyGate")
  LoadAnimationGroup("AsyLever")
  LoadAnimationGroup("AsySwtch")
  LoadAnimationGroup("AtcPlank")
  LoadAnimationGroup("Authority")
  LoadAnimationGroup("BANANA")
  LoadAnimationGroup("barelLad")
  LoadAnimationGroup("BarrGate")
  LoadAnimationGroup("BATON")
  LoadAnimationGroup("BBALL_21")
  LoadAnimationGroup("bbgun")
  LoadAnimationGroup("BCatcher")
  LoadAnimationGroup("BdrDoorL")
  LoadAnimationGroup("BeardLady")
  LoadAnimationGroup("Bike")
  LoadAnimationGroup("BikeGar")
  LoadAnimationGroup("BoldRoll")
  LoadAnimationGroup("BoltCutt")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("BoxRopes")
  LoadAnimationGroup("BRDoor")
  LoadAnimationGroup("BrkSwtch")
  LoadAnimationGroup("BROCKETL")
  LoadAnimationGroup("BRSwitch")
  LoadAnimationGroup("BusDoors")
  LoadAnimationGroup("Butcher")
  LoadAnimationGroup("BXPBag")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CarnCurt")
  LoadAnimationGroup("CARNI01")
  LoadAnimationGroup("carnies")
  LoadAnimationGroup("Car_Ham")
  LoadAnimationGroup("Cavalier")
  LoadAnimationGroup("Cheer_Cool1")
  LoadAnimationGroup("Cheer_Cool2")
  LoadAnimationGroup("Cheer_Cool3")
  LoadAnimationGroup("Cheer_Gen1")
  LoadAnimationGroup("Cheer_Gen2")
  LoadAnimationGroup("Cheer_Gen3")
  LoadAnimationGroup("Cheer_Girl1")
  LoadAnimationGroup("Cheer_Girl2")
  LoadAnimationGroup("Cheer_Girl3")
  LoadAnimationGroup("Cheer_Girl4")
  LoadAnimationGroup("Cheer_Nerd1")
  LoadAnimationGroup("Cheer_Nerd2")
  LoadAnimationGroup("Cheer_Nerd3")
  LoadAnimationGroup("Cheer_Posh1")
  LoadAnimationGroup("Cheer_Posh2")
  LoadAnimationGroup("Cheer_Posh3")
  LoadAnimationGroup("Chem_Set")
  LoadAnimationGroup("ChLead_Idle")
  LoadAnimationGroup("CLadderA")
  LoadAnimationGroup("CnGate")
  LoadAnimationGroup("Coaster")
  LoadAnimationGroup("COPBIKE")
  LoadAnimationGroup("Cop_Frisk")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("C_Wrestling")
  LoadAnimationGroup("DartBrd")
  LoadAnimationGroup("DartCab")
  LoadAnimationGroup("DodgeBall")
  LoadAnimationGroup("DodgeBall2")
  LoadAnimationGroup("DoorStr1")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("DRBrace")
  LoadAnimationGroup("Drumming")
  LoadAnimationGroup("DuffBag")
  LoadAnimationGroup("DunkBttn")
  LoadAnimationGroup("DunkSeat")
  LoadAnimationGroup("Earnest")
  LoadAnimationGroup("EnglishClass")
  LoadAnimationGroup("ErrandCrab")
  LoadAnimationGroup("Errand_BUS")
  LoadAnimationGroup("Errand_IND")
  LoadAnimationGroup("Errand_RIC")
  LoadAnimationGroup("Errand_SCH")
  LoadAnimationGroup("ESCDoorL")
  LoadAnimationGroup("ESCDoorR")
  LoadAnimationGroup("ExtWind")
  LoadAnimationGroup("FDoor")
  LoadAnimationGroup("FDoorB")
  LoadAnimationGroup("FDoorC")
  LoadAnimationGroup("Ferris")
  LoadAnimationGroup("FGhost")
  LoadAnimationGroup("FGoblin")
  LoadAnimationGroup("FlagA")
  LoadAnimationGroup("FLbBook")
  LoadAnimationGroup("FlbLader")
  LoadAnimationGroup("FLbPaint")
  LoadAnimationGroup("FLbTable")
  LoadAnimationGroup("FMCntrl")
  LoadAnimationGroup("FMDoor")
  LoadAnimationGroup("FMTrapDr")
  LoadAnimationGroup("FMTrapSw")
  LoadAnimationGroup("FortTell")
  LoadAnimationGroup("funCart")
  LoadAnimationGroup("funCurtn")
  LoadAnimationGroup("funMiner")
  LoadAnimationGroup("funRocks")
  LoadAnimationGroup("FunTeeth")
  LoadAnimationGroup("FXTestG")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("GarbCanA")
  LoadAnimationGroup("GatCool")
  LoadAnimationGroup("GEN_SOCIAL")
  LoadAnimationGroup("Gfight")
  LoadAnimationGroup("GhostDrs")
  LoadAnimationGroup("Gift")
  LoadAnimationGroup("Go_Cart")
  LoadAnimationGroup("Grap")
  LoadAnimationGroup("GymHoop")
  LoadAnimationGroup("GymWLad")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("Halloween")
  LoadAnimationGroup("HallWind")
  LoadAnimationGroup("Hang_Jock")
  LoadAnimationGroup("Hang_Moshing")
  LoadAnimationGroup("Hang_Talking")
  LoadAnimationGroup("Hang_Workout")
  LoadAnimationGroup("Hobos")
  LoadAnimationGroup("Hobo_Cheer")
  LoadAnimationGroup("HSdinger")
  LoadAnimationGroup("HUMIL_4-10_B")
  LoadAnimationGroup("HUMIL_4-10_C")
  LoadAnimationGroup("HUMIL_5-8F_A")
  LoadAnimationGroup("HUMIL_5-8F_B")
  LoadAnimationGroup("HUMIL_5-8V4-10")
  LoadAnimationGroup("HUMIL_5-8V6-1")
  LoadAnimationGroup("HUMIL_5-8VPLY")
  LoadAnimationGroup("HUMIL_5-8_A")
  LoadAnimationGroup("HUMIL_5-8_B")
  LoadAnimationGroup("HUMIL_5-8_C")
  LoadAnimationGroup("HUMIL_6-1V4-10")
  LoadAnimationGroup("HUMIL_6-1V6-1")
  LoadAnimationGroup("HUMIL_6-1VPLY")
  LoadAnimationGroup("HUMIL_6-1_A")
  LoadAnimationGroup("HUMIL_6-1_B")
  LoadAnimationGroup("HUMIL_6-1_C")
  LoadAnimationGroup("HUMIL_6-5V4-10")
  LoadAnimationGroup("HUMIL_6-5V6-1")
  LoadAnimationGroup("HUMIL_6-5VPLY")
  LoadAnimationGroup("HUMIL_6-5_A")
  LoadAnimationGroup("HUMIL_6-5_B")
  LoadAnimationGroup("HUMIL_6-5_C")
  LoadAnimationGroup("IDLE_AUTH_A")
  LoadAnimationGroup("IDLE_AUTH_B")
  LoadAnimationGroup("IDLE_AUTH_C")
  LoadAnimationGroup("IDLE_AUTH_D")
  LoadAnimationGroup("IDLE_BULLY_A")
  LoadAnimationGroup("IDLE_BULLY_B")
  LoadAnimationGroup("IDLE_BULLY_C")
  LoadAnimationGroup("IDLE_BULLY_D")
  LoadAnimationGroup("IDLE_CIVF_A")
  LoadAnimationGroup("IDLE_CIVF_B")
  LoadAnimationGroup("IDLE_CIVF_C")
  LoadAnimationGroup("IDLE_CIVM_A")
  LoadAnimationGroup("IDLE_CIVM_B")
  LoadAnimationGroup("IDLE_CIVM_C")
  LoadAnimationGroup("IDLE_DOUT_A")
  LoadAnimationGroup("IDLE_DOUT_B")
  LoadAnimationGroup("IDLE_DOUT_C")
  LoadAnimationGroup("IDLE_DOUT_D")
  LoadAnimationGroup("IDLE_FATG_A")
  LoadAnimationGroup("IDLE_FATG_B")
  LoadAnimationGroup("IDLE_FATG_C")
  LoadAnimationGroup("IDLE_FAT_A")
  LoadAnimationGroup("IDLE_FAT_B")
  LoadAnimationGroup("IDLE_FAT_C")
  LoadAnimationGroup("IDLE_GREAS_A")
  LoadAnimationGroup("IDLE_GREAS_B")
  LoadAnimationGroup("IDLE_GREAS_C")
  LoadAnimationGroup("IDLE_GREAS_D")
  LoadAnimationGroup("IDLE_GSF_A")
  LoadAnimationGroup("IDLE_GSF_B")
  LoadAnimationGroup("IDLE_GSF_C")
  LoadAnimationGroup("IDLE_GSM_A")
  LoadAnimationGroup("IDLE_GSM_B")
  LoadAnimationGroup("IDLE_GSM_C")
  LoadAnimationGroup("IDLE_JOCK_A")
  LoadAnimationGroup("IDLE_JOCK_B")
  LoadAnimationGroup("IDLE_JOCK_C")
  LoadAnimationGroup("IDLE_JOCK_D")
  LoadAnimationGroup("IDLE_NERD_A")
  LoadAnimationGroup("IDLE_NERD_B")
  LoadAnimationGroup("IDLE_NERD_C")
  LoadAnimationGroup("IDLE_NERD_D")
  LoadAnimationGroup("IDLE_NGIRL")
  LoadAnimationGroup("IDLE_PREP_A")
  LoadAnimationGroup("IDLE_PREP_B")
  LoadAnimationGroup("IDLE_PREP_C")
  LoadAnimationGroup("IDLE_PREP_D")
  LoadAnimationGroup("IDLE_SEXY_A")
  LoadAnimationGroup("IDLE_SEXY_B")
  LoadAnimationGroup("IDLE_SEXY_C")
  LoadAnimationGroup("INDgateC")
  LoadAnimationGroup("JPhoto")
  LoadAnimationGroup("JunkCarA")
  LoadAnimationGroup("JV_Asylum")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("KISS1")
  LoadAnimationGroup("KISS2")
  LoadAnimationGroup("KISS3")
  LoadAnimationGroup("KISS4")
  LoadAnimationGroup("KissAdult")
  LoadAnimationGroup("KISSB")
  LoadAnimationGroup("KISSF")
  LoadAnimationGroup("LckrGymA")
  LoadAnimationGroup("LE_Officer")
  LoadAnimationGroup("LE_Orderly")
  LoadAnimationGroup("Mermaid")
  LoadAnimationGroup("MG_Craps")
  LoadAnimationGroup("MINIBIKE")
  LoadAnimationGroup("MINICHEM")
  LoadAnimationGroup("MINIDARTS")
  LoadAnimationGroup("MINIDunk")
  LoadAnimationGroup("MINIGraf")
  LoadAnimationGroup("MINIHACKY")
  LoadAnimationGroup("MINI_Arm")
  LoadAnimationGroup("MINI_BallToss")
  LoadAnimationGroup("MINI_Lock")
  LoadAnimationGroup("MINI_React")
  LoadAnimationGroup("Miracle")
  LoadAnimationGroup("MOWER")
  LoadAnimationGroup("MPostA")
  LoadAnimationGroup("N2B Dishonerable")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("nerdBar1")
  LoadAnimationGroup("NIS_0_00A")
  LoadAnimationGroup("NIS_1_02")
  LoadAnimationGroup("NIS_1_02B")
  LoadAnimationGroup("NIS_1_03")
  LoadAnimationGroup("NIS_1_04")
  LoadAnimationGroup("NIS_1_05")
  LoadAnimationGroup("NIS_1_07")
  LoadAnimationGroup("NIS_1_08_1")
  LoadAnimationGroup("NIS_1_09")
  LoadAnimationGroup("NIS_1_11")
  LoadAnimationGroup("NIS_2_01")
  LoadAnimationGroup("NIS_2_03")
  LoadAnimationGroup("NIS_2_04")
  LoadAnimationGroup("NIS_2_06_1")
  LoadAnimationGroup("NIS_2_B")
  LoadAnimationGroup("NIS_2_S04")
  LoadAnimationGroup("NIS_3_01")
  LoadAnimationGroup("NIS_3_02")
  LoadAnimationGroup("NIS_3_04")
  LoadAnimationGroup("NIS_3_05")
  LoadAnimationGroup("NIS_3_06")
  LoadAnimationGroup("NIS_3_08")
  LoadAnimationGroup("NIS_3_11")
  LoadAnimationGroup("NIS_3_B")
  LoadAnimationGroup("NIS_3_G3")
  LoadAnimationGroup("NIS_3_R09_D")
  LoadAnimationGroup("NIS_3_R09_G")
  LoadAnimationGroup("NIS_3_R09_J")
  LoadAnimationGroup("NIS_3_R09_N")
  LoadAnimationGroup("NIS_3_R09_P")
  LoadAnimationGroup("NIS_3_S03")
  LoadAnimationGroup("NIS_3_S03_B")
  LoadAnimationGroup("NIS_3_S11")
  LoadAnimationGroup("NIS_4_01")
  LoadAnimationGroup("NIS_4_05")
  LoadAnimationGroup("NIS_4_06")
  LoadAnimationGroup("NIS_4_B2")
  LoadAnimationGroup("NIS_5_01")
  LoadAnimationGroup("NIS_5_02")
  LoadAnimationGroup("NIS_5_03")
  LoadAnimationGroup("NIS_5_04")
  LoadAnimationGroup("NIS_5_05")
  LoadAnimationGroup("NIS_5_07")
  LoadAnimationGroup("NIS_5_G5")
  LoadAnimationGroup("NIS_6_02")
  LoadAnimationGroup("NIS_6_03")
  LoadAnimationGroup("NLock01A")
  LoadAnimationGroup("NPC_Adult")
  LoadAnimationGroup("NPC_AggroTaunt")
  LoadAnimationGroup("NPC_Chat_1")
  LoadAnimationGroup("NPC_Chat_2")
  LoadAnimationGroup("NPC_Chat_F")
  LoadAnimationGroup("NPC_Cheering")
  LoadAnimationGroup("NPC_Love")
  LoadAnimationGroup("NPC_Mascot")
  LoadAnimationGroup("NPC_NeedsResolving")
  LoadAnimationGroup("NPC_Principal")
  LoadAnimationGroup("NPC_Shopping")
  LoadAnimationGroup("NPC_Spectator")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("ObsDoor")
  LoadAnimationGroup("OBSMotor")
  LoadAnimationGroup("ObsPtf_1")
  LoadAnimationGroup("ObsPtf_2")
  LoadAnimationGroup("Pageant")
  LoadAnimationGroup("PedCoaster")
  LoadAnimationGroup("Player_Tired")
  LoadAnimationGroup("Player_VTired")
  LoadAnimationGroup("POI_Booktease")
  LoadAnimationGroup("POI_Cafeteria")
  LoadAnimationGroup("POI_ChLead")
  LoadAnimationGroup("POI_Gen")
  LoadAnimationGroup("POI_Smoking")
  LoadAnimationGroup("POI_Telloff")
  LoadAnimationGroup("POI_WarmHands")
  LoadAnimationGroup("POI_Worker")
  LoadAnimationGroup("PortaPoo")
  LoadAnimationGroup("PrepDoor")
  LoadAnimationGroup("PunchBag")
  LoadAnimationGroup("pxHoop")
  LoadAnimationGroup("pxLad10M")
  LoadAnimationGroup("Px_Arcade")
  LoadAnimationGroup("Px_Bed")
  LoadAnimationGroup("Px_Fountain")
  LoadAnimationGroup("Px_Garb")
  LoadAnimationGroup("Px_Gen")
  LoadAnimationGroup("Px_Ladr")
  LoadAnimationGroup("Px_Rail")
  LoadAnimationGroup("Px_RedButton")
  LoadAnimationGroup("Px_Sink")
  LoadAnimationGroup("Px_Tlet")
  LoadAnimationGroup("Px_Tree")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("QPed")
  LoadAnimationGroup("RAT_PED")
  LoadAnimationGroup("Reeper")
  LoadAnimationGroup("RMailbox")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_PBomb")
  LoadAnimationGroup("Santa_Lap")
  LoadAnimationGroup("SAUTH_A")
  LoadAnimationGroup("SAUTH_F")
  LoadAnimationGroup("SAUTH_U")
  LoadAnimationGroup("SAUTH_X")
  LoadAnimationGroup("SBarels1")
  LoadAnimationGroup("SBULL_A")
  LoadAnimationGroup("SBULL_F")
  LoadAnimationGroup("SBULL_S")
  LoadAnimationGroup("SBULL_U")
  LoadAnimationGroup("SBULL_X")
  LoadAnimationGroup("Scaffold")
  LoadAnimationGroup("SCbanpil")
  LoadAnimationGroup("SCBell")
  LoadAnimationGroup("SCDoor")
  LoadAnimationGroup("ScGate")
  LoadAnimationGroup("SCgrdoor")
  LoadAnimationGroup("scObsDr")
  LoadAnimationGroup("ScoolBus")
  LoadAnimationGroup("SCOOTER")
  LoadAnimationGroup("SecDoorL")
  LoadAnimationGroup("SecDoorR")
  LoadAnimationGroup("Sedan")
  LoadAnimationGroup("SFAT_A")
  LoadAnimationGroup("SFAT_F")
  LoadAnimationGroup("SFAT_I")
  LoadAnimationGroup("SFAT_S")
  LoadAnimationGroup("SGEN_A")
  LoadAnimationGroup("SGEN_F")
  LoadAnimationGroup("SGEN_I")
  LoadAnimationGroup("SGEN_S")
  LoadAnimationGroup("SGIRLS")
  LoadAnimationGroup("SGIRL_A")
  LoadAnimationGroup("SGIRL_D")
  LoadAnimationGroup("SGIRL_F")
  LoadAnimationGroup("SGIRL_S")
  LoadAnimationGroup("SGTargB")
  LoadAnimationGroup("ShopBike")
  LoadAnimationGroup("SHUMIL_01")
  LoadAnimationGroup("SHWR")
  LoadAnimationGroup("SIAMESE")
  LoadAnimationGroup("Siamese2")
  LoadAnimationGroup("Sitting_Boys")
  LoadAnimationGroup("SK8Board")
  LoadAnimationGroup("Skateboard")
  LoadAnimationGroup("SkeltonMan")
  LoadAnimationGroup("Slingsh")
  LoadAnimationGroup("SNERD_A")
  LoadAnimationGroup("SNERD_F")
  LoadAnimationGroup("SNERD_I")
  LoadAnimationGroup("SNERD_S")
  LoadAnimationGroup("SNGIRLS")
  LoadAnimationGroup("SNGIRL_D")
  LoadAnimationGroup("SNGIRL_F")
  LoadAnimationGroup("SnowBlob")
  LoadAnimationGroup("SnowMND")
  LoadAnimationGroup("SnowWall")
  LoadAnimationGroup("SOLD_A")
  LoadAnimationGroup("SOLD_F")
  LoadAnimationGroup("SOLD_I")
  LoadAnimationGroup("SOLD_S")
  LoadAnimationGroup("SPLAY_A")
  LoadAnimationGroup("SPLAY_B")
  LoadAnimationGroup("SprayCan")
  LoadAnimationGroup("SpudG")
  LoadAnimationGroup("Squid")
  LoadAnimationGroup("StalDoor")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("SUV")
  LoadAnimationGroup("TadGates")
  LoadAnimationGroup("TadShud")
  LoadAnimationGroup("TE_Female")
  LoadAnimationGroup("TGKFlag")
  LoadAnimationGroup("ToolBox")
  LoadAnimationGroup("TrackSW")
  LoadAnimationGroup("TreeFall")
  LoadAnimationGroup("Truck")
  LoadAnimationGroup("Try_Clothes")
  LoadAnimationGroup("TSGate")
  LoadAnimationGroup("UBO")
  LoadAnimationGroup("Umbrella")
  LoadAnimationGroup("VDMilo")
  LoadAnimationGroup("VFlytrap")
  LoadAnimationGroup("V_Bike")
  LoadAnimationGroup("V_Bike_Races")
  LoadAnimationGroup("V_COPBIKE")
  LoadAnimationGroup("V_SCOOTER")
  LoadAnimationGroup("WBalloon")
  LoadAnimationGroup("WeaponUnlock")
  LoadAnimationGroup("Ween_Fem")
  LoadAnimationGroup("WHCrane")
  LoadAnimationGroup("WheelBrl")
  LoadAnimationGroup("WPCannon")
  LoadAnimationGroup("WPSheldB")
  LoadAnimationGroup("WPShield")
  LoadAnimationGroup("WPTurret")
  LoadAnimationGroup("W_BBall")
  LoadAnimationGroup("W_BBallBat")
  LoadAnimationGroup("W_BRocket")
  LoadAnimationGroup("W_Camera")
  LoadAnimationGroup("W_CherryBomb")
  LoadAnimationGroup("W_CHShield")
  LoadAnimationGroup("W_FlashLight")
  LoadAnimationGroup("W_Fountain")
  LoadAnimationGroup("W_Itchpowder")
  LoadAnimationGroup("W_JBroom")
  LoadAnimationGroup("W_Lid")
  LoadAnimationGroup("W_PooBag")
  LoadAnimationGroup("W_PRANK")
  LoadAnimationGroup("W_Slingshot")
  LoadAnimationGroup("W_Snowball")
  LoadAnimationGroup("W_snowshwl")
  LoadAnimationGroup("W_SprayCan")
  LoadAnimationGroup("W_SpudGun")
  LoadAnimationGroup("W_Stick")
  LoadAnimationGroup("W_Thrown")
  LoadAnimationGroup("W_wtrpipe")
  LoadAnimationGroup("x_cas1")
  LoadAnimationGroup("x_cas2")
  LoadAnimationGroup("x_cas3")
  LoadAnimationGroup("x_ccane")
  LoadAnimationGroup("X_Chair")
  LoadAnimationGroup("x_cndl")
  LoadAnimationGroup("x_sleigh")
  LoadAnimationGroup("x_tedy")
end

function TL_Buttons()
if IsButtonBeingPressed(7,0) and IsButtonBeingPressed(0,0) then
PedSetActionNode(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")
end
end

Offline SimonBestia

  • Full Member
  • ***
  • Posts: 294
  • Gender: Male
  • Bully-Board's Best Weeb
    • View Profile
    • Youtube Channel
Re: Action node taking a while to execute
« Reply #1 on: August 31, 2021, 04:12:59 AM »
Nothing's wrong with the code, but nodes are tricky.
They can have some kind of conditions before they get triggered, and ones made for NPCs aren't designed at all for the player.

Because of that, you really shouldn't try doing fighting-related stuff with Lua. It's just not how it works.
Those are all done by the .cat files in Act.img. Though we haven't figured them out properly, yet.

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Re: Action node taking a while to execute
« Reply #2 on: September 02, 2021, 08:02:50 AM »
Code: [Select]
if IsButtonBeingPressed(7,0) and IsButtonBeingPressed(0,0) then
 repeat
  PedSetAITree(gPlayer, "/Global/DarbyAI", "Act/AI_DARBY_2_B.act")
  PedSetActionNode(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")
  PedSetAITree(gPlayer, "/Global/PlayerAI", "Act/PlayerAI.act")
Wait(0)
 until PedIsPlaying(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")
end
Try this , maybe can help
« Last Edit: September 04, 2021, 03:40:56 AM by Ming »

Offline mhdt

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: Action node taking a while to execute
« Reply #3 on: September 05, 2021, 09:01:19 AM »
no,it should be.
Code: [Select]
if IsButtonBeingPressed(7,0) and IsButtonBeingPressed(0,0) then
 repeat
PedLockTarget(gplayer,-1)
  PedSetAITree(gPlayer, "/Global/DarbyAI", "Act/AI_DARBY_2_B.act")
  PedSetActionNode(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")
  PedSetAITree(gPlayer, "/Global/PlayerAI", "Act/PlayerAI.act")
Wait(0)
 until PedIsPlaying(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")
end

Offline Ming

  • Full Member
  • ***
  • Posts: 154
  • Gender: Male
  • 抽刀斷水水更流,舉杯消愁愁更愁
    • View Profile
Re: Action node taking a while to execute
« Reply #4 on: September 06, 2021, 12:26:17 AM »
Because sometimes when the player locks the ped, the action will be unavailable

Offline hereareyou

  • Jr. Member
  • **
  • Posts: 16
    • View Profile
Re: Action node taking a while to execute
« Reply #5 on: September 06, 2021, 07:38:32 PM »
Thanks for the answers! But I've figured it out myself. I switched to STimeCycle.lur. Now it works perfectly.
Code: [Select]
function main()
Wait(500)
LoadAllAnim()
repeat
if IsButtonPressed(7,0) and IsButtonPressed(0,0) then
     PedSetActionNode(gPlayer, "/Global/Nemesis/Offense/Short/Strikes/LightAttacks/JAB/HeavyAttacks/SuperUppercut/Knee", "Act/Anim/Nemesis.act")
end
    Wait(0)
until not Alive
end

 function LoadAllAnim()
  LoadAnimationGroup("Authority")
  LoadAnimationGroup("Boxing")
  LoadAnimationGroup("B_Striker")
  LoadAnimationGroup("CV_Female")
  LoadAnimationGroup("CV_Male")
  LoadAnimationGroup("DO_Edgar")
  LoadAnimationGroup("DO_Grap")
  LoadAnimationGroup("DO_StrikeCombo")
  LoadAnimationGroup("DO_Striker")
  LoadAnimationGroup("F_Adult")
  LoadAnimationGroup("F_BULLY")
  LoadAnimationGroup("F_Crazy")
  LoadAnimationGroup("F_Douts")
  LoadAnimationGroup("F_Girls")
  LoadAnimationGroup("F_Greas")
  LoadAnimationGroup("F_Jocks")
  LoadAnimationGroup("F_Nerds")
  LoadAnimationGroup("F_OldPeds")
  LoadAnimationGroup("F_Pref")
  LoadAnimationGroup("F_Preps")
  LoadAnimationGroup("G_Grappler")
  LoadAnimationGroup("G_Johnny")
  LoadAnimationGroup("G_Striker")
  LoadAnimationGroup("Grap")
  LoadAnimationGroup("J_Damon")
  LoadAnimationGroup("J_Grappler")
  LoadAnimationGroup("J_Melee")
  LoadAnimationGroup("J_Ranged")
  LoadAnimationGroup("J_Striker")
  LoadAnimationGroup("LE_Orderly")
  LoadAnimationGroup("Nemesis")
  LoadAnimationGroup("N_Ranged")
  LoadAnimationGroup("N_Striker")
  LoadAnimationGroup("N_Striker_A")
  LoadAnimationGroup("N_Striker_B")
  LoadAnimationGroup("P_Grappler")
  LoadAnimationGroup("P_Striker")
  LoadAnimationGroup("PunchBag")
  LoadAnimationGroup("Qped")
  LoadAnimationGroup("Rat_Ped")
  LoadAnimationGroup("Russell")
  LoadAnimationGroup("Russell_Pbomb")
  LoadAnimationGroup("Straf_Dout")
  LoadAnimationGroup("Straf_Fat")
  LoadAnimationGroup("Straf_Female")
  LoadAnimationGroup("Straf_Male")
  LoadAnimationGroup("Straf_Nerd")
  LoadAnimationGroup("Straf_Prep")
  LoadAnimationGroup("Straf_Savage")
  LoadAnimationGroup("Straf_Wrest")
  LoadAnimationGroup("TE_Female")
  collectgarbage()
end

function F_AttendedClass()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(false)
  PlayerSetPunishmentPoints(0)
end
function F_MissedClass()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  SetSkippedClass(true)
  StatAddToInt(166)
end
function F_AttendedCurfew()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrintString("You got home in time for curfew", 4)
  end
end
function F_MissedCurfew()
  if not PedInConversation(gPlayer) and not MissionActive() then
    TextPrint("TM_TIRED5", 4, 2)
  end
end
function F_StartClass()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
  local l_6_0 = PlayerGetPunishmentPoints() + GetSkippingPunishment()
end
function F_EndClass()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  F_RingSchoolBell()
end
function F_StartMorning()
  F_UpdateTimeCycle()
end
function F_EndMorning()
  F_UpdateTimeCycle()
end
function F_StartLunch()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    F_UpdateTimeCycle()
    return
  end
  F_UpdateTimeCycle()
end
function F_EndLunch()
  F_UpdateTimeCycle()
end
function F_StartAfternoon()
  F_UpdateTimeCycle()
end
function F_EndAfternoon()
  F_UpdateTimeCycle()
end
function F_StartEvening()
  F_UpdateTimeCycle()
end
function F_EndEvening()
  F_UpdateTimeCycle()
end
function F_StartCurfew_SlightlyTired()
  F_UpdateTimeCycle()
end
function F_StartCurfew_Tired()
  F_UpdateTimeCycle()
end
function F_StartCurfew_MoreTired()
  F_UpdateTimeCycle()
end
function F_StartCurfew_TooTired()
  F_UpdateTimeCycle()
end
function F_EndCurfew_TooTired()
  F_UpdateTimeCycle()
end
function F_EndTired()
  F_UpdateTimeCycle()
end
function F_Nothing()
end
function F_ClassWarning()
  if IsMissionCompleated("3_08") and not IsMissionCompleated("3_08_PostDummy") then
    return
  end
  local l_23_0 = math.random(1, 2)
end
function F_UpdateTimeCycle()
  if not IsMissionCompleated("1_B") then
    local l_24_0 = GetCurrentDay(false)
    if l_24_0 < 0 or 2 < l_24_0 then
      SetCurrentDay(0)
    end
  end
  F_UpdateCurfew()
end
function F_UpdateCurfew()
  local l_25_0 = shared.gCurfewRules
  l_25_0 = l_25_0 or F_CurfewDefaultRules
  l_25_0()
end
function F_CurfewDefaultRules()
  local l_26_0 = ClockGet()
  if 23 <= l_26_0 or l_26_0 < 7 then
    shared.gCurfew = true
  else
    shared.gCurfew = false
  end
end

Edit: It was because I was using IsButtonBeingPressed instead of IsButtonPressed.
« Last Edit: September 06, 2021, 08:26:21 PM by hereareyou »