Staredit Newtork
Community
StarCraft
Games
Site
Favourites
Bunker Loading Problem, Sometimes it doesn't work right...

Creator: DaMiNaToR
Time: Oct 15 2007, 8:03 pm

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

[Avatar]
Buffalo killed by banana truck in Wyoming.
 offline contact
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
Description:

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
Description:

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
Description:

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
Description:

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
Description:

Players:
¤ Player 1

Conditions:
¤ Switch 99 is set

Actions:
¤ Run AI script 'Enter closest bunker' at 'Load P1'
¤ Preserve


Trigger
Description:

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.
(user posted image)
Top

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

[Avatar]
 offline contact
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??
Private Sub cmdSignature_Click()
MsgBox "Starcraft Rocks!"
end sub
Top

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

[Avatar]
 offline contact
Quote from DaMiNaToROkay, 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
Description:

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
Description:

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
Description:

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
Description:

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
Description:

Players:
¤ Player 1

Conditions:
¤ Switch 99 is set

Actions:
¤ Run AI script 'Enter closest bunker' at 'Load P1'
¤ Preserve


Trigger
Description:

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..
(user posted image)
Top

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

[Avatar]
 offline contact
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)
Private Sub cmdSignature_Click()
MsgBox "Starcraft Rocks!"
end sub
Top

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

[Avatar]
 offline contact
Quote from Aoe325Ooooooh 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.. =/
(user posted image)
Top

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

[Avatar]
 offline contact
Quote from Kellimus
Quote from Aoe325Ooooooh 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
Private Sub cmdSignature_Click()
MsgBox "Starcraft Rocks!"
end sub
Top

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

[Avatar]
Peaceful Warrior
 offline contact
I'll say this:
Condense your triggers. The current system you have could have too many bugs if stuff is added later.
(user posted image)
Top

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

[Avatar]
Master of 239.242 D1 Items
 online contact
Just a short question:
'Enter closest bunker' in 'anywhere' in every trigger cycle does not work?
(user posted image)
Top

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

[Avatar]
 offline contact
Quote from Aoe325
Quote from Kellimus
Quote from Aoe325Ooooooh 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 AhliJust 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.
(user posted image)
Top

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

[Avatar]
Buffalo killed by banana truck in Wyoming.
 offline contact
Quote from Aoe325Ooooooh 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 KellimusWhy 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 AhliJust 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 Aoe325How the HELL did you get -217 minerals??


I have no clue... lol
(user posted image)
Top

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

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
Quote from DaMiNaToR
Quote from AhliJust 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.
(signature image)
http://sonsofwar.pyrom.net/index.html___0% (user posted image) 100%
Top

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

[Avatar]
Buffalo killed by banana truck in Wyoming.
 offline contact
Quote from NudeRaider
Quote from DaMiNaToR
Quote from AhliJust 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.
(user posted image)
Top

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

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
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. ;)
(signature image)
http://sonsofwar.pyrom.net/index.html___0% (user posted image) 100%
Top

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

[Avatar]
Master of 239.242 D1 Items
 online contact
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
(user posted image)
Top

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

[Avatar]
 offline contact
Quote from DaMiNaToR
Quote from AhliJust 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..
(user posted image)
Top

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

[Avatar]
 offline contact
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.
Top

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

[Avatar]
 offline contact
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?
This post was edited 1 time, last edit by Viii_iiiV: Oct 24 2007, 12:03 am.
(user posted image)
Top

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

[Avatar]
 offline contact
Quote from Viii_iiiVSilly 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
(user posted image)
Top

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

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact
Quote from Viii_iiiVSilly 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?
(signature image)
http://sonsofwar.pyrom.net/index.html___0% (user posted image) 100%
Top

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

[Avatar]
Write your own destiny, or else someone will write it for you!
 offline contact