Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: I think i broke my hypertrigger
I think i broke my hypertrigger
Jul 5 2013, 9:41 am
By: Zacharee  

Jul 5 2013, 9:41 am Zacharee Post #1



So me and this guy were stress testing a map i'm making and i think i managed to break my hypertrigger. In the map you get money for killing zerg units so the guy burrows 200+ zerglings in a small spot and tells me to kill them with a hero firebat (onehitkill on zerglings). So i did it and instead of instantly getting a bunch of "50" text messages as per usual with splash kills i start getting one message roughly every second for a few minutes.

here are the triggers:
Trigger
Players
  • All Players
  • Conditions
  • Current player Kills score is at least 50.
  • Foes has suffered at least 1 deaths of Zerg Zergling.
  • Actions
  • Display for current player: 50
  • Modify resources for Current player: Add 50 Ore and Gas.
  • Modify score for Current player: Subtract 50 kills.
  • Modify death counts for Foes: Subtract 1 for Zerg Zergling.
  • Preserve trigger.


  • and the hypertrigger is the same as the "complex hyper trigger" found on the wiki:
    Trigger
    Players
  • Player 4
  • Conditions
  • 'Switch 1' is set.
  • Actions
  • Wait for 0 milliseconds.
  • Clear 'Switch 1'.
  • Wait for 0 milliseconds.
  • Preserve trigger.


  • Trigger
    Players
  • Player 6
  • Conditions
  • 'Switch 1' is cleared.
  • Actions
  • Wait for 0 milliseconds.
  • Set 'Switch 1'.
  • Wait for 0 milliseconds.
  • Preserve trigger.


  • this isn't a huge issue since i don't think players killing 200+ of any unit will be overly common i would still like to fix it.


    another issue i'm having is for some reason the computers sometimes stop mining if you kill one of their hatcheries, although sometimes when this happens they will still make other units and move their overlords around and such.

    here is my trigger to start the ai:
    Trigger
    Players
  • Player 4
  • Conditions
  • Always.
  • Actions
  • Execute AI script 'Expansion Zerg Campaign Insane' at 'Purple AI'.
  • Execute AI script 'Value This Area Higher' at 'Zerg AI'.
  • Set Terran to Ally.
  • Set Player 6 to Enemy.


  • 'Purple AI' is a location covering all of his starting bases. 'Zerg AI' is a location covering the entire center area, i added the action that uses it in hopes of keeping the computers focused on each other and not attack the human players too much although it doesn't seem to work very well. Also this bug happens significantly more often with player 4 (has only happened once with player 6) even though the triggers for each are virtually identical, with obvious necessary changes. One more thing, killing all of the hatcheries owned by the frozen computer causes them to rebuild and start mining again.



    None.

    Jul 5 2013, 10:46 am Leeroy_Jenkins Post #2



    I'm not sure how that would interfere with the hyper triggers. You should at least have another trigger running to test if it truly is the hyper triggers, not base it off the one trigger. Maybe change your triggering around to not subtract deaths for "foes" in the actions. Since that will subtract deaths for all foes, not the "triggering" foe from the condition. Unless there is only one "foe" player in question. Even still, I don't see how that could be causing the problem, it's hard to tell.

    Any way of uploading the map?

    Also try temporarily disabling the "complex hyper triggers" and test using normal ones.

    Post has been edited 1 time(s), last time on Jul 5 2013, 10:55 am by Leeroy_Jenkins.



    None.

    Jul 6 2013, 3:20 am death6373 Post #3



    For the zergling kill problem try giving the hyper triggers owned by player 6 to player 3 and make player 3 owned by a computer. Although I'm not sure if player 3 being owned by a human or computer would affect anything :bleh:



    None.

    Jul 6 2013, 3:24 am Vrael Post #4



    Each hyper trigger should have roughly 62 "Wait 0" actions, not 2. Also, why are you using complex hyper triggers if you have computer players? If the computer players never leave the game there's no need for complex hyper triggers. Also, the player that owns the hyper triggers must be in the game for them to execute.

    Also what Leeroy said was good, when you do "Subtract 1 for Foes" that will subtract 1 zergling death for each Foe in the game, not 1 death total.



    None.

    Jul 6 2013, 3:49 am Zacharee Post #5



    Quote from Leeroy_Jenkins
    I'm not sure how that would interfere with the hyper triggers. You should at least have another trigger running to test if it truly is the hyper triggers, not base it off the one trigger. Maybe change your triggering around to not subtract deaths for "foes" in the actions. Since that will subtract deaths for all foes, not the "triggering" foe from the condition. Unless there is only one "foe" player in question. Even still, I don't see how that could be causing the problem, it's hard to tell.

    Any way of uploading the map?

    Also try temporarily disabling the "complex hyper triggers" and test using normal ones.

    well ideally for this map everyones deaths for any zerg unit should be at 0. so based on your description of how the player 'foes' works this should be fine, unless it is what's causing the bug. however if it is possible for players to have a negative death count for a unit then this is not fine. What kind of trigger could i use to test if it is the hyper triggers? the map does fit the requirements of the release second but right no i havn't had the time to write up a description for it in the recommended template. are the normal hypers considered to be more reliable? i only used the complex hypers because they seemed like less work and more effecient to me.



    Quote from death6373
    For the zergling kill problem try giving the hyper triggers owned by player 6 to player 3 and make player 3 owned by a computer. Although I'm not sure if player 3 being owned by a human or computer would affect anything :bleh:

    right now player 3 is a human player (my only non essential players are 7 and 8 and right now they are temporary observer slots) I only organized the the forces based on color similarities, teal and blue are one team and red and orange or the other. are the player numbers somehow relevant? i'm not sure i understand your suggestion, could you elaborate?



    None.

    Jul 6 2013, 4:13 am death6373 Post #6



    Just delete the hyper triggers from player 6

    Trigger
    Players
  • Player 6
  • Conditions
  • 'Switch 1' is cleared.
  • Actions
  • Wait for 0 milliseconds.
  • Set 'Switch 1'.
  • Wait for 0 milliseconds.
  • Preserve trigger.


  • And then add for player 3

    Trigger
    Players
  • Player 3
  • Conditions
  • 'Switch 1' is cleared.
  • Actions
  • Wait for 0 milliseconds.
  • Set 'Switch 1'.
  • Wait for 0 milliseconds.
  • Preserve trigger.


  • The text messages should display instantly after you've done this unless i've missed something :D



    None.

    Jul 6 2013, 11:01 pm Zacharee Post #7



    they text messages do display instantly. the hyper trigger broke after i killed 200+ zerglings with splash... I'm not all that worried about this bug.

    the big issue is the ai freezing. i guess i should have put that as the topic lol

    also, if it isn't clear the two bugs are not related



    None.

    Jul 7 2013, 12:02 am death6373 Post #8



    Strange in my map that i tested i killed 400 zerglings and copied the exact same triggers as you and it worked fine. Try checking to see if the players that own the hyper triggers are in the game. (such as in game the comps have units/human slots being filled by another player)

    Attachments:
    Killing test.scm
    Hits: 0 Size: 53.56kb



    None.

    Jul 7 2013, 12:12 am UnholyUrine Post #9



    So the Hyper Triggers only stop working when you kill 200+ zerglings?
    or does it work at all?

    Make sure you have no Wait triggers anywhere else in the game.



    None.

    Jul 7 2013, 8:21 pm Zacharee Post #10



    waaaaait i think i know what the problem is... if a computer player 'loses' is that the same as them leaving the game? i think we might have killed off one of the computers and the zerglings were just the next thing i killed so i thought they caused the problem. both hypers are owned by computers and i have absolutely 0 wait triggers outside of the hypers.



    None.

    Jul 7 2013, 8:25 pm Azrael Post #11



    You shouldn't give the computer players defeat triggers :P You can simulate a defeat easily enough.

    Edit: By request, I'll also mention you shouldn't give computer players victory or draw triggers, either.

    Post has been edited 2 time(s), last time on Jul 7 2013, 10:27 pm by Azrael.




    Jul 7 2013, 10:16 pm Zacharee Post #12



    ok now that i have that issue fixed can we talk about why my ai keeps bugging out?



    None.

    Jul 7 2013, 11:07 pm death6373 Post #13



    what exactly do you want to happen with your computers. (Such as killing one hatchery doesn't stop the mining or killing all the hatcheries makes it so they won't rebuild)



    None.

    Jul 7 2013, 11:52 pm Vrael Post #14



    Try using a different AI script. The one you picked may actually be executing correctly and be scheduled to stop building in the circumstances you described.



    None.

    Jul 8 2013, 11:32 pm Zacharee Post #15



    what would happen if i added preserve trigger to my ai triggers?



    None.

    Jul 8 2013, 11:41 pm Leeroy_Jenkins Post #16



    Quote from Zacharee
    what would happen if i added preserve trigger to my ai triggers?

    It would probably constantly keep running an AI script and keep resetting itself, so probably nothing good.



    None.

    Jul 9 2013, 9:33 pm Zacharee Post #17



    yep i tested it. the comp just spends all his starting money building hatcheries and then doesn't mine. could anyone recommend an ai script? i have this problem with both the "zerg expansion campaign insane" and "zerg expansion custom" ai scripts. could there be a way to detect if the comp isn't mining and then make him start again?



    None.

    Jul 9 2013, 9:49 pm Leeroy_Jenkins Post #18



    Have you tried it without the "Value this area higher" AI script?

    Also, can you explain the situation with the computers mining? I understand that the problem is they won't constantly rebuild hatcheries and go back to mining after killed? This might be common of all AI scripts to not go into "start-rebuilding-hatcheries-everywhere" mode to prolong a game they lost. I would try to give yourself a "switch" in-game to re-run the AI script once it "breaks" and see if that works. If that works, you would want to set the trigger up to automatically detect when it needs to re-run.

    More information on what overall game mechanic you are trying to achieve with these computer miners would be helpful.



    None.

    Jul 9 2013, 10:46 pm Zacharee Post #19



    that may work i just don't know how to use triggers to detect when they break. basically the mechanic for the computers is no different than melee. what i've noticed is when they stop mining the drones usually gather around the nearest hatchery and they stack as if they think they are still mining. i did use 'value this are higher' originally but i took it out to see if it was causing the problem somehow, it wasn't but i havn't put it back in since it didn't seem to do anything.

    they will rebuild hatcheries and expand if they can, that isn't the problem.



    None.

    Jul 10 2013, 12:26 am Zacharee Post #20



    posted the map with these bugs in the map showcase



    None.

    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [01:53 am]
    Ultraviolet -- :lol:
    [06:51 pm]
    Vrael -- It is, and I could definitely use a company with a commitment to flexibility, quality, and customer satisfaction to provide effective solutions to dampness and humidity in my urban environment.
    [06:50 pm]
    NudeRaider -- Vrael
    Vrael shouted: Idk, I was looking more for a dehumidifer company which maybe stands out as a beacon of relief amidst damp and unpredictable climates of bustling metropolises. Not sure Amazon qualifies
    sounds like moisture control is often a pressing concern in your city
    [06:50 pm]
    Vrael -- Maybe here on the StarEdit Network I could look through the Forums for some Introductions to people who care about the Topics of Dehumidifiers and Carpet Cleaning?
    [06:49 pm]
    Vrael -- Perhaps even here I on the StarEdit Network I could look for some Introductions.
    [06:48 pm]
    Vrael -- On this Topic, I could definitely use some Introductions.
    [06:48 pm]
    Vrael -- Perhaps that utilizes cutting-edge technology and eco-friendly cleaning products?
    [06:47 pm]
    Vrael -- Do you know anyone with a deep understanding of the unique characteristics of your carpets, ensuring they receive the specialized care they deserve?
    [06:45 pm]
    NudeRaider -- Vrael
    Vrael shouted: I've also recently becoming interested in Carpet Cleaning, but I'd like to find someone with a reputation for unparalleled quality and attention to detail.
    beats me, but I'd make sure to pick the epitome of excellence and nothing less.
    [06:41 pm]
    Vrael -- It seems like I may need Introductions to multiple companies for the Topics that I care deeply about, even as early as Today, 6:03 am.
    Please log in to shout.


    Members Online: Wing Zero, Roy