The only thing I still do not understand about Starcode: how do you merge more values (say Played Games and Won Games) into one single encypted string, and even more important, how can you extract that exact value from the string being sure it's the thing you want, say Won Games? And, if for example I later add a third value into the string creating a new code, would that mess the old one, so that I am no more able to find the value of Won Games using the method used until that time?
Finally solved, basically recreating the order via Triggers; I'll put here the Trigger as public resource:
UnitTrainChangeOwnerEventsUnit-AnyUnitcreatesaunitwithabilityBarracks-TrainorbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityFactory-Train(Factory)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityRoboticsFacility-Train(RoboticsFacility)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityLarva-MorphUnit(Larva->Basic)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityNexus-TrainMothershiporbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityNexusTrainMothershipCore(Unnamed)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityGateway-Train(Gateway)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityWarpGate-Train(WarpGate)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityStargate-Train(Stargate)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityStarport-TrainorbehaviorNoGameLinkLocalVariablesOrderCount=0<Integer>Order=NoOrder<Order[31]>
Conditions
(Behavior that created unit) == None
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Unit type of (Created unit)) is Worker) == False
Then
Variable - Set Order Count = ((Count of orders on (Created unit)) - 1)
General - Pick each integer from 0 to Order Count, and do (Actions)
Actions
General - Switch (Actions) depending on (Target type for ((Created unit) order at index (Picked integer)))
Cases
General - If (None)
Actions
Variable - Set Order[(Pickedinteger)] = ((Ability command for ((Created unit) order at index (Picked integer))))
General - If (Item)
Actions
Variable - Set Order[(Pickedinteger)] = ((Ability command for ((Created unit) order at index (Picked integer))) targeting (Target item for ((Created unit) order at index (Picked integer))))
General - If (Point)
Actions
Variable - Set Order[(Pickedinteger)] = ((Ability command for ((Created unit) order at index (Picked integer))) targeting (Target point for ((Created unit) order at index (Picked integer))))
General - If (Unit)
Actions
Variable - Set Order[(Pickedinteger)] = ((Ability command for ((Created unit) order at index (Picked integer))) targeting (Target unit for ((Created unit) order at index (Picked integer))))
Default
Unit - Change ownership of (Created unit) to player 2 and Change Color
General - Pick each integer from 0 to Order Count, and do (Actions)
Actions
Unit - Order (Created unit) to Order[(Pickedinteger)] (After Existing Orders)
Else
I store my unit order in a variable with array size 31 (32 orders). So I then change the ownership of the unit to the player's ally. And I recall the variable to issue orders to the unit, so the order queue is not forgotten while changing owner.
But this seems to be not enough, since units still not execute their order. I'm quite sure that the order variable store also the player who ordered, and if the player has no control on the new unit, the unit will not execute the stored orders. I can say this because the order list works when changing to an ally on which I have unit control, while are forgotten when I switch to an ally on which I have no control, or enemy, or neutral.
I basically use this system to remember the rally point, but also on unit morphing order queue.
How can I make the unit to properly execute their orders when ownership is changed?
CODE:
UnitTrainChangeOwnerEventsUnit-AnyUnitcreatesaunitwithabilityBarracks-TrainorbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityFactory-Train(Factory)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityRoboticsFacility-Train(RoboticsFacility)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityLarva-MorphUnit(Larva->Basic)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityNexus-TrainMothershiporbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityGateway-Train(Gateway)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityWarpGate-Train(WarpGate)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityStargate-Train(Stargate)orbehaviorNoGameLinkUnit-AnyUnitcreatesaunitwithabilityStarport-TrainorbehaviorNoGameLinkLocalVariablesOrderCount=0<Integer>Order=NoOrder<Order[31]>
Conditions
(Behavior that created unit) == None
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
((Unit type of (Created unit)) is Worker) == False
Then
Variable - Set Order Count = ((Count of orders on (Created unit)) - 1)
General - Pick each integer from 0 to Order Count, and do (Actions)
Actions
Variable - Set Order[(Pickedinteger)] = ((Created unit) order at index (Picked integer))
Unit - Change ownership of (Created unit) to player 2 and Change Color
General - Pick each integer from 0 to Order Count, and do (Actions)
Actions
Unit - Order (Created unit) to Order[(Pickedinteger)] (After Existing Orders)
Else
Perhaps you could use a remove charge from ability action.
Yes but to use Nuke I still need the Ghost Academy to be owned by the owner of the caster unit. So it can't even be used before that.
Anyway, I'll use the dynamic owner change. No worries.
And yes, I checked my Documents/StarCraft II/Banks/MacroMicroExtension.SC2Bank for 20-30 times with different actions/orders, and I can assume that the bank resets every time I check any value or save it in the bank after a new loading. Tested on Battle.net too, same issue.
Making two players with a Ghost each to share Nuke ammos armed by one single player.
The only way I figured out how to do this is changing Ghost Academies owner on-demand, but it's a bit clunky. There are better solutions?
If I press the test button, my map is normally loaded, the values are saved and so on. But if i repress the test button at the beginning of the map all keys and sections are removed from my bank - resetted.
My bank name does not use spaces, _, or special characters.
Here is what i do:
Map
Preload Data dialog
Banks
Preload bank "<BankName>" for each player
Triggers
Open bank "<BankName>" for player 1
Set Bank[1] (last opened bank)
Open bank "<BankName>" for player 2
Set Bank[2]...
To save my key:
Pick each player in all players
If (key <X> section <Y> from bank Bank[Picked player] == FALSE
Save TRUE boolean as key <X> section <Y> in Bank[Picked player]
Thank you, I do not know how I would have done without your help.
I'm asking this because I have to hook different default UI elements, so I'd like to know if Panel is the default type for all, or at least most of them.
Ah, sorry, that must be the problem! Also if I'm not sure to have understood how Auto-adjust works.
Anyway, you have more plans for this masterpiece arcade? Like new tile sets, bomber models, upgrades, some doodads like -say- water, lava , maybe in combination with different terran heights (that would be crazy xD). This is definitely the BEST arcade I never played, maybe after Star Party :D
0
The only thing I still do not understand about Starcode: how do you merge more values (say Played Games and Won Games) into one single encypted string, and even more important, how can you extract that exact value from the string being sure it's the thing you want, say Won Games? And, if for example I later add a third value into the string creating a new code, would that mess the old one, so that I am no more able to find the value of Won Games using the method used until that time?
0
Finally solved, basically recreating the order via Triggers; I'll put here the Trigger as public resource:
0
Yes but not every ability has that flag, Rally and Move don't have it, and that's fundamental.
0
Also, it can help specifying the ability in the Event, rather on a Triggering Ability Condition to stress CPU less, or it's the same?
0
I store my unit order in a variable with array size 31 (32 orders). So I then change the ownership of the unit to the player's ally. And I recall the variable to issue orders to the unit, so the order queue is not forgotten while changing owner. But this seems to be not enough, since units still not execute their order. I'm quite sure that the order variable store also the player who ordered, and if the player has no control on the new unit, the unit will not execute the stored orders. I can say this because the order list works when changing to an ally on which I have unit control, while are forgotten when I switch to an ally on which I have no control, or enemy, or neutral.
I basically use this system to remember the rally point, but also on unit morphing order queue.
How can I make the unit to properly execute their orders when ownership is changed?
CODE:
0
Yes but to use Nuke I still need the Ghost Academy to be owned by the owner of the caster unit. So it can't even be used before that. Anyway, I'll use the dynamic owner change. No worries.
0
Really?? This is definitely the problem, then. My project is a mod.
0
@Apollys: Go Of course I save my bank, right after saving a value in the bank, look at these lines from the second trigger of the code above:
And yes, I checked my Documents/StarCraft II/Banks/MacroMicroExtension.SC2Bank for 20-30 times with different actions/orders, and I can assume that the bank resets every time I check any value or save it in the bank after a new loading. Tested on Battle.net too, same issue.
0
0
Making two players with a Ghost each to share Nuke ammos armed by one single player. The only way I figured out how to do this is changing Ghost Academies owner on-demand, but it's a bit clunky. There are better solutions?
0
If I press the test button, my map is normally loaded, the values are saved and so on. But if i repress the test button at the beginning of the map all keys and sections are removed from my bank - resetted. My bank name does not use spaces, _, or special characters. Here is what i do:
To save my key:
Sorry for bad syntax not using enUS editor.
0
Damn that's too bad, anyway some tileset like primal jungle are really nice :S
Hoping on future updates ^^
0
Thank you, I do not know how I would have done without your help.
I'm asking this because I have to hook different default UI elements, so I'd like to know if Panel is the default type for all, or at least most of them.
0
@DuckyTheDuck: Go
Ah, sorry, that must be the problem! Also if I'm not sure to have understood how Auto-adjust works.
Anyway, you have more plans for this masterpiece arcade? Like new tile sets, bomber models, upgrades, some doodads like -say- water, lava , maybe in combination with different terran heights (that would be crazy xD). This is definitely the BEST arcade I never played, maybe after Star Party :D
0
Learn to use Triggers, I can't even figure how to do it with Data module, while is relatively easy with Actions.