Hi All,
hopefully i am posting in the right section?
anyway i've created a simple custom AI script ...more specifically its a 6 pool rush script which works fine and serves as a good way to practice against 6 pool timings for newcomers to starcraft 2.
my next project was supposed to be an antidote to the 6 pool from a terran point of view which involves completely walling off on the "steppes of war" map.
so far the script executes well, the scv's make2 supply depot's and a rax at the chokepoint completely blocking off the zerglings entry point ...but there's just 1 small problem the supply depots are being built in the lowered position :( and when the zerg script sends the lings they obviously just enter the base.
i've asked this question before in an older thread (which someone else created) but so far i've drawn a blank.
could anyone suggest the correct code for creating a supply depot in the raised position?
furthermore after the intial zerg push fails due to the walloff i intend to send the marines created from the rax to the zerg base which obviously involves having to lower the depots so as you can see i need full control over the depots.
You can send orders to the depot.
I don't know the exact function, but you can look them up in GUI too. Just order the depot to Lower / Raise when you need it.
But how do you actually create the supply depot? Because a depot that an SCV has built show always be raised by default..
You can send orders to the depot.
I don't know the exact function, but you can look them up in GUI too. Just order the depot to Lower / Raise when you need it.
But how do you actually create the supply depot? Because a depot that an SCV has built show always be raised by default..
hehe as strange as it seems blizzards own AI build order code tends to build supply depots in the lowered position by default. i assume blizzard did this because it didn't want the depots obstructing movement throughout its own base.?
this can be confirmed by setting up a 1v1 and playing against a terran AI. You should see that every depot it builds is lowered. :(
i suppose if it did build the depots in the raised position by default (using AI code) i would have ended up here sooner or later asking how to lower them since the rines need to get out of the base sooner or later to attack :)
i'll try using the GUI to see if i can figure out how to manipulate a built depot but getting my head around the gui editor is going to take me on a huge tangent.
oh btw here's some examples from blizzard that builds a depot (lowered)
ex 1: AISetStockFarms( player, c_TB_SupplyDepot, c_stockNormalFarms);
ex 2: AISetStock( player, 1, c_TB_SupplyDepot );
ex 3: AISetStock( player, 1, c_TB_SupplyDepot_Alias );
c_AB_DepotRaise <<< I Suspect this is an ability command but there's no known Blizzard examples showing it in the correct syntax manipulating supply depots.
The automatic lowering of supply depots is somewhere in the engine. I have completely replaced all the AI scripts with my project and the depots are still getting lowered.
However, creating an order that should raise them shouldn't be hard. The Blizzard AI scripts have a function for creating orders based on a unit and an ability.
The most important to use this function is the unit pointer. You need to get the supply depot you want to lower/raise in some way. If you need help with that, let me know. For the player argument, you can simply use UnitGetOwner(unit u) and plug the supply depot in there as well.
The ability string is indeed the c_AB_DepotRaise you found. Of course there is also c_AB_DepotLower. Those are defined in the requirements.galaxy.
The AITacticalOrder function creates the order based on the ability and checks if the result is a viable order for the unit you specified. If this is not the case, it will return null.
Now you need a way to give the supply depot the order to raise or lower. There are actually two ways to do that:
I am using UnitIssueOrder in my project, because with the inQueueType I can queue orders which is not possible with AICast. Downside is that orders given with UnitIssueOrder are not registered by the APM meter.
Hi All, hopefully i am posting in the right section? anyway i've created a simple custom AI script ...more specifically its a 6 pool rush script which works fine and serves as a good way to practice against 6 pool timings for newcomers to starcraft 2.
my next project was supposed to be an antidote to the 6 pool from a terran point of view which involves completely walling off on the "steppes of war" map. so far the script executes well, the scv's make2 supply depot's and a rax at the chokepoint completely blocking off the zerglings entry point ...but there's just 1 small problem the supply depots are being built in the lowered position :( and when the zerg script sends the lings they obviously just enter the base.
i've asked this question before in an older thread (which someone else created) but so far i've drawn a blank.
could anyone suggest the correct code for creating a supply depot in the raised position?
furthermore after the intial zerg push fails due to the walloff i intend to send the marines created from the rax to the zerg base which obviously involves having to lower the depots so as you can see i need full control over the depots.
any help appreciated.
You can send orders to the depot.
I don't know the exact function, but you can look them up in GUI too. Just order the depot to Lower / Raise when you need it.
But how do you actually create the supply depot? Because a depot that an SCV has built show always be raised by default..
hehe as strange as it seems blizzards own AI build order code tends to build supply depots in the lowered position by default. i assume blizzard did this because it didn't want the depots obstructing movement throughout its own base.? this can be confirmed by setting up a 1v1 and playing against a terran AI. You should see that every depot it builds is lowered. :(
i suppose if it did build the depots in the raised position by default (using AI code) i would have ended up here sooner or later asking how to lower them since the rines need to get out of the base sooner or later to attack :)
i'll try using the GUI to see if i can figure out how to manipulate a built depot but getting my head around the gui editor is going to take me on a huge tangent.
oh btw here's some examples from blizzard that builds a depot (lowered)
ex 1: AISetStockFarms( player, c_TB_SupplyDepot, c_stockNormalFarms);
ex 2: AISetStock( player, 1, c_TB_SupplyDepot );
ex 3: AISetStock( player, 1, c_TB_SupplyDepot_Alias );
c_AB_DepotRaise <<< I Suspect this is an ability command but there's no known Blizzard examples showing it in the correct syntax manipulating supply depots.
The automatic lowering of supply depots is somewhere in the engine. I have completely replaced all the AI scripts with my project and the depots are still getting lowered.
However, creating an order that should raise them shouldn't be hard. The Blizzard AI scripts have a function for creating orders based on a unit and an ability.
The most important to use this function is the unit pointer. You need to get the supply depot you want to lower/raise in some way. If you need help with that, let me know. For the player argument, you can simply use UnitGetOwner(unit u) and plug the supply depot in there as well.
The ability string is indeed the c_AB_DepotRaise you found. Of course there is also c_AB_DepotLower. Those are defined in the requirements.galaxy.
The AITacticalOrder function creates the order based on the ability and checks if the result is a viable order for the unit you specified. If this is not the case, it will return null.
Now you need a way to give the supply depot the order to raise or lower. There are actually two ways to do that:
I am using UnitIssueOrder in my project, because with the inQueueType I can queue orders which is not possible with AICast. Downside is that orders given with UnitIssueOrder are not registered by the APM meter.
To summarize: