• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[Trigger] run trigger function not working

Status
Not open for further replies.
Level 3
Joined
May 12, 2012
Messages
59
hey there, ive been looking online and searching here for a fix and i have not been able to find one. im setting up a zombie map like the one in COD, a never ending slaughter fest and i cant seem to get the "run trigger" function to work when its used in an "if, then, else" function.

I posted the trigger below so if you can see a solution please let me know, im trying to avoid custom scripts though so please keep it simple GUI, i like making my stuff so other people can snag it later.

  • Waves
    • Events
    • Conditions
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Zombie_Numbers Less than or equal to 0
              • Zombies_OTF Less than or equal to 0
        • Then - Actions
          • Set Zombie_Numbers = (Base_Number + 12)
          • Set Base_Number = Zombie_Numbers
          • Set Zombies_AOTF = (Zombies_AOTF + 5)
          • Set Level = (Level + 1)
          • Trigger - Run Round <gen> (checking conditions)
          • Wait 6.00 seconds
        • Else - Actions
          • Wait until ((Zombie_Numbers Less than or equal to 0) and (Zombies_OTF Less than or equal to 0)), checking every 1.00 seconds
          • Trigger - Run (This trigger) (checking conditions)
The above trigger is called twice, once when the random character is generated and again after each wave which is posted below. The first time works correctly, but the second does not.

  • Round
    • Events
    • Conditions
    • Actions
      • Game - Display to (All players) the text: (String(Level))
      • -------- Needs Fix --------
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • Zombie_Numbers Less than or equal to 0
              • Zombies_OTF Less than or equal to 0
        • Then - Actions
          • -------- Test --------
          • Set Zombie_Numbers = 0
          • Set Zombies_OTF = 0
          • -------- Test --------
          • Trigger - Run Waves <gen> (checking conditions)
        • Else - Actions
          • Do nothing
I put two variables in the trigger to set both of the conditional values to zero to determine if that indeed was the case... it was not. I havent been able to get them to work unless i move the "run trigger" function out of the "if, then, else" function. its driving me batty and ive been working on it for a week. Assistance would be great.

Thank you
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
theres not enough information.

what triggers set Zombie_Numbers? What trigger runs Round? Whats OTF...
 
Level 3
Joined
May 12, 2012
Messages
59
Q&A

The variables are not the issue, those count fine; i cant get the run trigger function to work and begin the rest of the game, why it does not i do not know, the "test" comments were there for me to remember i added them to test the returns without killing the zombies to see if it fails; it did not matter, but as an answer to your question:

The First trigger posted calls the second one to run, a third one determines the numbers of the zombies after they die which sets the, OTF refers to "on the field" to make sure that when a loop function is being used in a different trigger it can keep running even though there is the max number of zombies on the field, there is a base number variable that keeps up by having an initial value and adding 12 each round. i have been tweaking the trigger and looking it over so i have forgotten the other questions and information you asked for.

long story short though i just need to know why that stupid "run trigger" wont work inside the "if, then, else" function, as previously mentioned with the variables set to zero on the second trigger it should work correctly, but doesnt
 
Level 19
Joined
Aug 8, 2007
Messages
2,765
because the if then else is returning false? which is why I'd like to know where they're set?

your running it once which sets the variables correctly but theyre not getting subtracted so the if then else still returns false. if you put it in the else and the then, then it would work
 
Level 3
Joined
May 12, 2012
Messages
59
yup

yuuuuuup, that did it, honestly embarrassed that i made that mistake. i suppose that is why the word ass is in both assume and embarrassed.

Thanks for the help man, i thought i just needed another set of eyes to look at it and i guess i was right; at least that assumption was correct.
 
Status
Not open for further replies.
Top