Staredit Network > Forums > SC1 UMS Mapmaking Assistance > Topic: Bunker Loading Problem
Bunker Loading Problem
Oct 15 2007, 8:03 pm
By: DaMiNaToR  

Oct 15 2007, 8:03 pm DaMiNaToR Post #1



Okay, so I've got a map with 8 players, each player has an observer with upgraded movement speed that creates units underneath it. The main units that are created by the observers are bunkers, and each time a bunker is created, it also creates 4 infantry next to it. The infantry are supposed to immediately load into the bunker when they appear, but the problem is that sometimes the AI script will tell the infantry to load into a different bunker nearby that's already full which ends up with random infantry standing around on the map. The triggers I have right now are as follows for each player:

Trigger
Players

  • Player 1
  • Conditions

  • All Players bring at most 0 any unit to P1(a bunker-sized location following the observer)
  • Actions

  • Move all Protoss Beacon owned by current player at anywhere to 'P1'
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Current player brings at least 1 Protoss Beacon to 'P1'
  • Switch 99 is cleared
  • Actions

  • Move all Protoss Beacon for current player at 'P1' to 'Beacon P1'(a location on the side of the map)
  • Create 1 Bunker for current player at 'P1'
  • Center location labeled 'Load P1'(a 5x4 location) on Bunker owned by current player at 'P1'
  • Set switch 99
  • Set switch 1
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Current player brings at least 1 Protoss Beacon to 'P1'
  • Switch 99 is set
  • Actions

  • Move all Protoss Beacon for current player at 'P1' to 'Beacon P1'
  • Create 1 Bunker for current player at 'P1'
  • Center location labeled 'Load P1 2'(another 5x4 location) on Bunker owned by current player at 'P1'
  • Clear switch 99
  • Set switch 1
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Switch 1 is set
  • Current player brings at least 1 Bunker to 'P1'
  • Actions

  • Create 4 infantry for current player at 'P1'
  • Clear switch 1
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Switch 99 is set
  • Actions

  • Run AI script 'Enter closest bunker' at 'Load P1'
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Switch 99 is cleared
  • Actions

  • Run AI script 'Enter closest bunker' at 'Load P1 2'
  • Preserve


  • I think that covers my whole system. I also have hyper triggers on. I think it might just be happening because the observer is moving too fast, but I'm not sure. Either way, I need a way to fix it.



    None.

    Oct 15 2007, 8:09 pm Aoe325 Post #2



    Well the only solution I see would be to set a minimal distance between bunkers. that way it would always work. That simply means having a larger location follow the observer and requiring it to be empty.. of course I'm sure there's a better way but I'm a noob what do I know ^^

    edit : How the HELL did you get -217 minerals??



    None.

    Oct 15 2007, 8:10 pm Kellimus Post #3



    Quote from DaMiNaToR
    Okay, so I've got a map with 8 players, each player has an observer with upgraded movement speed that creates units underneath it. The main units that are created by the observers are bunkers, and each time a bunker is created, it also creates 4 infantry next to it. The infantry are supposed to immediately load into the bunker when they appear, but the problem is that sometimes the AI script will tell the infantry to load into a different bunker nearby that's already full which ends up with random infantry standing around on the map. The triggers I have right now are as follows for each player:

    Trigger
    Players

  • Player 1
  • Conditions

  • All Players bring at most 0 any unit to P1(a bunker-sized location following the observer)
  • Actions

  • Move all Protoss Beacon owned by current player at anywhere to 'P1'
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Current player brings at least 1 Protoss Beacon to 'P1'
  • Switch 99 is cleared
  • Actions

  • Move all Protoss Beacon for current player at 'P1' to 'Beacon P1'(a location on the side of the map)
  • Create 1 Bunker for current player at 'P1'
  • Center location labeled 'Load P1'(a 5x4 location) on Bunker owned by current player at 'P1'
  • Set switch 99
  • Set switch 1
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Current player brings at least 1 Protoss Beacon to 'P1'
  • Switch 99 is set
  • Actions

  • Move all Protoss Beacon for current player at 'P1' to 'Beacon P1'
  • Create 1 Bunker for current player at 'P1'
  • Center location labeled 'Load P1 2'(another 5x4 location) on Bunker owned by current player at 'P1'
  • Clear switch 99
  • Set switch 1
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Switch 1 is set
  • Current player brings at least 1 Bunker to 'P1'
  • Actions

  • Create 4 infantry for current player at 'P1'
  • Clear switch 1
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Switch 99 is set
  • Actions

  • Run AI script 'Enter closest bunker' at 'Load P1'
  • Preserve


  • Trigger
    Players

  • Player 1
  • Conditions

  • Switch 99 is cleared
  • Actions

  • Run AI script 'Enter closest bunker' at 'Load P1 2'
  • Preserve


  • I think that covers my whole system. I also have hyper triggers on. I think it might just be happening because the observer is moving too fast, but I'm not sure. Either way, I need a way to fix it.

    I haven't touched StarEdit (or any of its third-party evolutions) or triggers in forever but it seems like maybe you should make a trigger that is "connected" (or whatever you guys call it nowadays) to the Observer, and wherever the observer is, the infantry would bunker under it?


    Just an idea..



    None.

    Oct 15 2007, 8:12 pm Aoe325 Post #4



    Ooooooh I know I got an idea!!

    Everytime you place a bunker move the bunker to a bunker storing area of the map, and place a bunker sprite at the old place... but that also means you need virtual hp since the bunker isnt attackable

    edit : (it would still fire)



    None.

    Oct 15 2007, 8:18 pm Kellimus Post #5



    Quote from Aoe325
    Ooooooh I know I got an idea!!

    Everytime you place a bunker move the bunker to a bunker storing area of the map, and place a bunker sprite at the old place... but that also means you need virtual hp since the bunker isnt attackable

    edit : (it would still fire)

    Why go through all that hassle (and hacking of your map, which could result in corruption) and make it so there is a location that is part of the observer (again, I haven't touched triggers in forever) and have it so whenever the observer is above a bunker (or creates it), marines that are still outside of your bunker, bunker wherever your observer goes?

    Sounds much more simple and easy than what you're trying to get him to do.. =/



    None.

    Oct 15 2007, 8:35 pm Aoe325 Post #6



    Quote from Kellimus
    Quote from Aoe325
    Ooooooh I know I got an idea!!

    Everytime you place a bunker move the bunker to a bunker storing area of the map, and place a bunker sprite at the old place... but that also means you need virtual hp since the bunker isnt attackable

    edit : (it would still fire)

    Why go through all that hassle (and hacking of your map, which could result in corruption) and make it so there is a location that is part of the observer (again, I haven't touched triggers in forever) and have it so whenever the observer is above a bunker (or creates it), marines that are still outside of your bunker, bunker wherever your observer goes?

    Sounds much more simple and easy than what you're trying to get him to do.. =/

    He wants marines to bunker up immediately, and unless they are given a move order they will always try to bunker up in the full bunker, so they will never reach the bunker they're suppose to go in



    None.

    Oct 15 2007, 8:53 pm Akar Post #7



    I'll say this:
    Condense your triggers. The current system you have could have too many bugs if stuff is added later.



    None.

    Oct 15 2007, 8:56 pm Ahli Post #8

    I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

    Just a short question:
    'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?




    Oct 15 2007, 9:28 pm Kellimus Post #9



    Quote from Aoe325
    Quote from Kellimus
    Quote from Aoe325
    Ooooooh I know I got an idea!!

    Everytime you place a bunker move the bunker to a bunker storing area of the map, and place a bunker sprite at the old place... but that also means you need virtual hp since the bunker isnt attackable

    edit : (it would still fire)

    Why go through all that hassle (and hacking of your map, which could result in corruption) and make it so there is a location that is part of the observer (again, I haven't touched triggers in forever) and have it so whenever the observer is above a bunker (or creates it), marines that are still outside of your bunker, bunker wherever your observer goes?

    Sounds much more simple and easy than what you're trying to get him to do.. =/

    He wants marines to bunker up immediately, and unless they are given a move order they will always try to bunker up in the full bunker, so they will never reach the bunker they're suppose to go in

    Uh, duh? I know this.

    If he has the order in the trigger that is connected to the observer, it should work how he wants it to.

    At least the logic behind it does.

    Quote from Ahli
    Just a short question:
    'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?


    It should, and probibly would.

    But that could get very tedious because you'd have to put which unit would do it, and it would get long and repetative, quickly.



    None.

    Oct 16 2007, 3:12 am DaMiNaToR Post #10



    Quote from Aoe325
    Ooooooh I know I got an idea!!

    Everytime you place a bunker move the bunker to a bunker storing area of the map, and place a bunker sprite at the old place... but that also means you need virtual hp since the bunker isnt attackable

    edit : (it would still fire)

    No, too complicated and there's other reasons I can't do that.

    Quote from Kellimus
    Why go through all that hassle (and hacking of your map, which could result in corruption) and make it so there is a location that is part of the observer (again, I haven't touched triggers in forever) and have it so whenever the observer is above a bunker (or creates it), marines that are still outside of your bunker, bunker wherever your observer goes?

    Sounds much more simple and easy than what you're trying to get him to do.. =/

    I already have that, it's just that sometimes the infantry tries to get in the bunker right next to the one I want it to. "Logically" my system should already work.

    Quote from Ahli
    Just a short question:
    'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?

    I can't do that either, because my map also has a mass attack option that instantly kills all of a player's bunkers and makes their units attack wherever they want. The AI script would throw off the mass attack order.

    Quote from Aoe325
    How the HELL did you get -217 minerals??

    I have no clue... lol



    None.

    Oct 16 2007, 12:41 pm NudeRaider Post #11

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from DaMiNaToR
    Quote from Ahli
    Just a short question:
    'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?

    I can't do that either, because my map also has a mass attack option that instantly kills all of a player's bunkers and makes their units attack wherever they want. The AI script would throw off the mass attack order.

    Then make condition not always but make it when current player brings at least 1 bunker to anywhere.




    Oct 16 2007, 12:45 pm DaMiNaToR Post #12



    Quote from NudeRaider
    Quote from DaMiNaToR
    Quote from Ahli
    Just a short question:
    'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?

    I can't do that either, because my map also has a mass attack option that instantly kills all of a player's bunkers and makes their units attack wherever they want. The AI script would throw off the mass attack order.

    Then make condition not always but make it when current player brings at least 1 bunker to anywhere.

    The problem is that even when you use mass attack, your observer will still create more bunkers while your units are massing, which means you'd still have bunkers.



    None.

    Oct 16 2007, 3:40 pm NudeRaider Post #13

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Please specify the details on what's going on. Only then we can give you solutions that work for you.

    How is it supposed to work exactly? Bunkers again filled with units, but others still massing?

    However I think Ahlis idea is the way to go. We just need to adjust it to your needs.
    Because I've seen many maps experiencing similar problems when bunkers can be placed next to each other. Getting AI scripts to do always like they should is very hard. ;)




    Oct 16 2007, 4:44 pm Ahli Post #14

    I do stuff and thingies... Try widening and reducing the number of small nooks and crannies to correct the problem.

    He decided to make 2 units inside the bunker and he has to make the location a little bit bigger than 5x4, maybe 5.5x4.5.
    Met him on us-east :O




    Oct 16 2007, 7:04 pm Kellimus Post #15



    Quote from DaMiNaToR
    Quote from Ahli
    Just a short question:
    'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?

    I can't do that either, because my map also has a mass attack option that instantly kills all of a player's bunkers and makes their units attack wherever they want. The AI script would throw off the mass attack order.

    Then isn't that where you would create a Switch Trigger for it?


    I really haven't touched Triggers and the StarEdit stuff since I started learning Programming...

    If the Switch Trigger is what I think it is, then you could easily do what Ahli said.

    To me, Switch Trigger is the same as an If statement.


    if(condition){
    // Do what you want
    }

    So you'd go through and make the triggers for the Switch, but have it to where " 'Enter closest bunker' in 'anywhere' " only happens if the Switch is on.


    For example:

    'Player 1' brings '1' 'Observer' to 'anywhere'
    Set 'Switch EnterBunker' (Switch 1 if you haven't renamed it) on

    'Switch EnterBunker' is 'on' (Again, I don't remember the syntax and stuff, so put it into syntax that would work ;))
    'Enter closest bunker' in 'anywhere'




    Wouldn't that work for you?





    Have you made a location for air only units? You could possibly even fix your problem like that....



    I don't know what the new editors do, because I haven't really used them (I love StarForge's triggers.. Gotta love the C-style way of doing things :D) so I don't know if you can choose that or not...

    I know you could in StarEdit..



    None.

    Oct 16 2007, 7:18 pm elysium.kliu Post #16



    I didn't exactly want to read everyone's post but as far as I can tell the marines attempt to enter the wrong bunker.

    You should try a smaller location for the enter bunker script. I think one the size of a bunker still works, so like 3x2.



    None.

    Oct 23 2007, 11:45 pm Viii_iiiV Post #17



    Silly people.
    Why not just use different players for each alternate bunker, and have the loading trigger seperate and just running through the bunkers? I mean, you could just place one for P1, one for P11, one for P1, one for P11, and then load the P1 ones at the time and just run through the P11 ones, loading them and when they're loading giving to P1, then onto the next.
    You would have do use some burrowed zerg unit underneath them to keep your eight humans though.

    EDIT: Or, before you spawn a bunker you could just give the last bunker you spawned to P11, and then once that bunker is loaded give it to P11 and turn the other one to P1.






    EDIT2: You could have three bunker sized locations - L1, and L2

    If no obs in L2, make a bunk there and load it for P11, move L1 to ob
    If no obs in L1, make a bunk there and load it for P1, give to P11, give bunk in L2 to P1, move L2 to ob.
    REPEAT

    Simple, eh?

    Post has been edited 1 time(s), last time on Oct 24 2007, 12:03 am by Viii_iiiV.



    None.

    Oct 24 2007, 5:14 am Kellimus Post #18



    Quote from Viii_iiiV
    Silly people.
    Why not just use different players for each alternate bunker, and have the loading trigger seperate and just running through the bunkers? I mean, you could just place one for P1, one for P11, one for P1, one for P11, and then load the P1 ones at the time and just run through the P11 ones, loading them and when they're loading giving to P1, then onto the next.
    You would have do use some burrowed zerg unit underneath them to keep your eight humans though.

    EDIT: Or, before you spawn a bunker you could just give the last bunker you spawned to P11, and then once that bunker is loaded give it to P11 and turn the other one to P1.






    EDIT2: You could have three bunker sized locations - L1, and L2

    If no obs in L2, make a bunk there and load it for P11, move L1 to ob
    If no obs in L1, make a bunk there and load it for P1, give to P11, give bunk in L2 to P1, move L2 to ob.
    REPEAT

    Simple, eh?

    But its hard to use P11 triggers in StarEdit :P



    None.

    Oct 24 2007, 3:11 pm NudeRaider Post #19

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from Viii_iiiV
    Silly people.
    Why not just use different players for each alternate bunker, and have the loading trigger seperate and just running through the bunkers? I mean, you could just place one for P1, one for P11, one for P1, one for P11, and then load the P1 ones at the time and just run through the P11 ones, loading them and when they're loading giving to P1, then onto the next.
    You would have do use some burrowed zerg unit underneath them to keep your eight humans though.

    EDIT: Or, before you spawn a bunker you could just give the last bunker you spawned to P11, and then once that bunker is loaded give it to P11 and turn the other one to P1.

    EDIT2: You could have three bunker sized locations - L1, and L2

    If no obs in L2, make a bunk there and load it for P11, move L1 to ob
    If no obs in L1, make a bunk there and load it for P1, give to P11, give bunk in L2 to P1, move L2 to ob.
    REPEAT

    Simple, eh?
    First off stop insulting us - like in your topic about the corrupt map (though it was "your friend" there). If you got a good idea lets hear it and don't call others silly.

    Secondly your first and the last method doesnt work because enter bunker script doesnt work for P9-P255
    and the other method (giving last created bunker to P11 after enter) wouldn't solve it completely because the obs might fly to other bunkers already full and compromising it again.

    Thirdly you need a location BIGGER than a bunker or the units outside would not get affected by the ai script.

    So who's silly now?




    Oct 24 2007, 3:15 pm NudeRaider Post #20

    We can't explain the universe, just describe it; and we don't know whether our theories are true, we just know they're not wrong. >Harald Lesch

    Quote from Kellimus
    But its hard to use P11 triggers in StarEdit :P
    Just stop posting about things you have no clue of... Most of what you said did not apply for him because its not only logical problem but also is about how starcraft works.

    Using P11 triggers is not "hard". If you're using ScmDraft or SF you can use them all by default. But the problem is many actions are simply not working for players 9-255. You have to know (or check) which ones work.




    Options
      Back to forum
    Please log in to reply to this topic or to report it.
    Members in this topic: None.
    [04:00 pm]
    Vrael -- good map
    [04:00 pm]
    Vrael -- damn dude you got 27 years of playtime out of that map
    [03:01 pm]
    Oh_Man -- https://www.youtube.com/watch?v=JgODe0xG2Cw finished it last week lol
    [01:37 pm]
    Vrael -- jesus christ that was 2005?
    [09:19 am]
    Linekat -- cool
    [01:56 am]
    Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
    [09:24 pm]
    Moose -- denis
    [05:00 pm]
    lil-Inferno -- benis
    [2024-4-19. : 10:41 am]
    v9bettel -- Nice
    Please log in to shout.


    Members Online: Vrael, Roy, Dem0n, C(a)HeK