Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Triggering player)) == Playing
Then
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Picked unit)) == Uncommandable
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Else
UI - Display "1" for (All players) to Debug area
As you can see I am in no shape or form on how to create proper triggers that would work on the first try.
So, too sum it all up, this is what I want this trigger function do..
-Player (A) has 10 Marines on the field
-10 Marines are not 'Commandable'
-Trigger Detects Marines are now Uncommandable
-Changes ownership of those marines to Hostile Computer 'player 15'
turn triggering player into picked player, and go from there!
*edit*
Ohh, hey, I just helped you with that other trigger. Are you looking to make sure the units dont attack or do ANYTHING once a player cannot afford them? if so; back in that other trigger I helped you with, inside the "pick every unit" loop, add a "pause picked unit"
If you would specifically like neutral player to control them (which I dont think would have much of a difference from pausing them) then we can do that too; it will just be a tiny bit more annoying. It too, can be added into that last trigger.
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Picked player)) == Playing
Then
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Picked unit)) == Uncommandable
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Else
UI - Display "1" for (All players) to Debug area
The marines remain under my control after 5 seconds of being Uncommandable.
What I like to do is make it so after 60 seconds or in this case 5 seconds, the trigger will change ownership of the marines to player 15 hostile making them rebel troops.
If this trigger could be combined with the other one you showed me to make I am willing to do that.
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Pause (Picked unit)
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Unpause (Picked unit)
Unit - Make (Picked unit) Commandable
Else
Default
I am guessing you are refering this is how it should look like?
ohh, alright, I see. I have a good way to do this I think. in the second trigger there; remove the pause/unpause; unless you like that. Where you have the "pause" and "unpause" units thing; for the one where you pause the units and they become uncommandable; add an action to set the custom value 0 of the unit to 1. When they become commandable again, set the custom value 0 of the unit to 0; and also set the custom value 1 equal to 0.
for your second trigger, we will pick all units that have a custom value 0 equal to 1 (custom values are an easy way to mark units for future reference without having to save variables)
Action - unit group - pick each unit in unit group - units in unit group with custom value
once you have that, the "unit group" set to units in region matching condition; like you have above. Use entire map, and set your conditions to excluse SCV's and such.
Then make sure the rest of it is "custom value 0 equal to 1"
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
you should end up with this.
in the actions for that; you are going to set the picked units custom value 1 + 1
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
Just use arithmetic (REAL) to do the equation.
Below that, you will want to check what the custom value of that unit is now; to see how long they have been uncontrollable.
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Unit - Set (Picked unit) custom value 0 to 2.0
Else
where it says "custom value >= 12" that 12 is an interval in 5's of how long you want to wait before a unit becomes uncontrollable. 12X5=60 seconds. If you want 10 seconds, put 2 there. The reason we set their custom value 0 to 2 later, is so that it isnt grabbed up by any future triggers that may use these references.
In the end you should have a set of actions that looks like this:
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Unit - Set (Picked unit) custom value 0 to 2.0
Else
Sorry, for what you are trying to tell me is like ..... WAYYY over my head. May I ask that you better explain everything. step by step please lol
If you could, just take this Code and reenter what I need for it please lol
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Make (Picked unit) Commandable
Else
Default
create a new trigger; periodic event, every 5 seconds. then for your actions, put this:
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Unit - Set (Picked unit) custom value 0 to 2.0
Else
once you have that, let me know, and i will explain the next step; which is very easy.
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
I do not know how you added the
with custom value 0 equal to 1.0) - At the end of 'Any Amount'
Action - unit group - pick each unit in unit group - units in unit group with custom value
Go through that order; once you have "pick each unit in unit group" click the "unit group" words and on the list, go to "units in unit group with custom value"
then you will have another blue "unit group" inside of that; to do the "whole map matching conditions"
once you have that, the "unit group" set to units in region matching condition; like you have above. Use entire map, and set your conditions to excluse SCV's and such.
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Set (Picked unit) custom value 0 to 2.0
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Set (Picked unit) custom value 0 to 2.0
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Still have not learned how you managed to do the + 1.0 under the Actions Set Picked unit
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
where you have "(Custom value 1 of (Picked unit))" click the first parenthesis to change the number here... in the search bar for what you want to set this too, type in "arith" and click the "arithmetic (Real) function. this should change you "(Custom value 1 of (Picked unit))" to "Value + 1.0"
then you click "value" and input that "(Custom value 1 of (Picked unit))"
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Set (Picked unit) custom value 0 to 2.0
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
next step, =)?
ps, you are awsome, I have to say I am learning quite the bit from all this. Hopfully I won't have then need to ask for help lol
alright, that trigger looks good! now, go back to your other trigger.
where you have "Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))" above "make picked unit uncommandable" change the (custom value 1 of (picked unit))" to "1" and the custom value array to 0 so it should read, "Unit - Set (Picked unit) custom value 0 to 1.0" You want to set the custom value 0 to 1; not the custom value 1 to 1.
Now, take that, and copy it; then past it twice, right above your action to "make picked unit commandable"
"Unit - Set (Picked unit) custom value 0 to 0.0"
"Unit - Set (Picked unit) custom value 1 to 0.0"
once you have this; it should work properly for you.
As a heads up; you may want to make sure neutral hostile has some sort of minerals, to avoid a conflict. or you can write condition somewhere; this isnt needed at all, but may help reduce lag; should that become a problem. IT may be a non issue though. Dont worry bout it unless it becomes an issue i guess.
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 0.0
Unit - Set (Picked unit) custom value 0 to 1.0
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Make (Picked unit) Commandable
Else
Default
move: "Unit - Set (Picked unit) custom value 0 to 0.0" down to the second part of that trigger; right above "Unit - Make (Picked unit) Commandable"
then, after it is moved, copy and paste it onto itself, so you have 2 of them.
Unit - Set (Picked unit) custom value 0 to 0.0
Unit - Set (Picked unit) custom value 1 to 0.0
Unit - Make (Picked unit) Commandable
then make it like that ^^
overall you want:
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 1.0
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 0.0
Unit - Set (Picked unit) custom value 1 to 0.0
Unit - Make (Picked unit) Commandable
Else
Default
Perhaps once i am ready for a good alpha test again, i'll invite you to try it out on battle.net with me and 4 other friends. You can see your handy work you've done for me.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Here is my Code,
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Triggering player)) == Playing
Then
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Picked unit)) == Uncommandable
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Else
UI - Display "1" for (All players) to Debug area
As you can see I am in no shape or form on how to create proper triggers that would work on the first try.
So, too sum it all up, this is what I want this trigger function do..
-Player (A) has 10 Marines on the field
-10 Marines are not 'Commandable'
-Trigger Detects Marines are now Uncommandable
-Changes ownership of those marines to Hostile Computer 'player 15'
(Status of player (Triggering player)) == Playing
turn triggering player into picked player, and go from there!
*edit*
Ohh, hey, I just helped you with that other trigger. Are you looking to make sure the units dont attack or do ANYTHING once a player cannot afford them? if so; back in that other trigger I helped you with, inside the "pick every unit" loop, add a "pause picked unit"
If you would specifically like neutral player to control them (which I dont think would have much of a difference from pausing them) then we can do that too; it will just be a tiny bit more annoying. It too, can be added into that last trigger.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
New code you told me to use,
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Player Group - Pick each player in (Active Players) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Status of player (Picked player)) == Playing
Then
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Owner of (Picked unit)) == Uncommandable
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Else
UI - Display "1" for (All players) to Debug area
The marines remain under my control after 5 seconds of being Uncommandable.
What I like to do is make it so after 60 seconds or in this case 5 seconds, the trigger will change ownership of the marines to player 15 hostile making them rebel troops.
If this trigger could be combined with the other one you showed me to make I am willing to do that.
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Pause (Picked unit)
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Unpause (Picked unit)
Unit - Make (Picked unit) Commandable
Else
Default
I am guessing you are refering this is how it should look like?
ohh, alright, I see. I have a good way to do this I think. in the second trigger there; remove the pause/unpause; unless you like that. Where you have the "pause" and "unpause" units thing; for the one where you pause the units and they become uncommandable; add an action to set the custom value 0 of the unit to 1. When they become commandable again, set the custom value 0 of the unit to 0; and also set the custom value 1 equal to 0.
for your second trigger, we will pick all units that have a custom value 0 equal to 1 (custom values are an easy way to mark units for future reference without having to save variables)
Action - unit group - pick each unit in unit group - units in unit group with custom value
once you have that, the "unit group" set to units in region matching condition; like you have above. Use entire map, and set your conditions to excluse SCV's and such.
Then make sure the rest of it is "custom value 0 equal to 1"
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
you should end up with this.
in the actions for that; you are going to set the picked units custom value 1 + 1
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
Just use arithmetic (REAL) to do the equation.
Below that, you will want to check what the custom value of that unit is now; to see how long they have been uncontrollable.
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Unit - Set (Picked unit) custom value 0 to 2.0
Else
where it says "custom value >= 12" that 12 is an interval in 5's of how long you want to wait before a unit becomes uncontrollable. 12X5=60 seconds. If you want 10 seconds, put 2 there. The reason we set their custom value 0 to 2 later, is so that it isnt grabbed up by any future triggers that may use these references.
In the end you should have a set of actions that looks like this:
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Unit - Set (Picked unit) custom value 0 to 2.0
Else
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Otay, try to bare with me as I try to pin the tale on the donkey here, this information really looks complex to understand. This shall take me a bit.
Sorry, for what you are trying to tell me is like ..... WAYYY over my head. May I ask that you better explain everything. step by step please lol
If you could, just take this Code and reenter what I need for it please lol
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Make (Picked unit) Commandable
Else
Default
create a new trigger; periodic event, every 5 seconds. then for your actions, put this:
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Unit - Set (Picked unit) custom value 0 to 2.0
Else
once you have that, let me know, and i will explain the next step; which is very easy.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Ok one moment
I have this,
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
I do not know how you added the
with custom value 0 equal to 1.0) - At the end of 'Any Amount'
Action - unit group - pick each unit in unit group - units in unit group with custom value
Go through that order; once you have "pick each unit in unit group" click the "unit group" words and on the list, go to "units in unit group with custom value"
then you will have another blue "unit group" inside of that; to do the "whole map matching conditions"
once you have that, the "unit group" set to units in region matching condition; like you have above. Use entire map, and set your conditions to excluse SCV's and such.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
This is what I have done,
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Set (Picked unit) custom value 0 to 2.0
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
I now have this,
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Set (Picked unit) custom value 0 to 2.0
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
Still have not learned how you managed to do the + 1.0 under the Actions Set Picked unit
Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))
where you have "(Custom value 1 of (Picked unit))" click the first parenthesis to change the number here... in the search bar for what you want to set this too, type in "arith" and click the "arithmetic (Real) function. this should change you "(Custom value 1 of (Picked unit))" to "Value + 1.0"
then you click "value" and input that "(Custom value 1 of (Picked unit))"
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
wow I never figure that out lol I now have,
Rebel
Events
Timer - Every 5.0 seconds of Game Time
Local Variables
Conditions
Actions
Unit Group - Pick each unit in (Units in (Any units in (Entire map) owned by player Any Player matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) with custom value 0 equal to 1.0) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 1 to ((Custom value 1 of (Picked unit)) + 1.0)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Custom value 1 of (Picked unit)) >= 12.0
Then
Unit - Set (Picked unit) custom value 0 to 2.0
Unit - Change ownership of (Picked unit) to player 15 and Change Color
Else
next step, =)?
ps, you are awsome, I have to say I am learning quite the bit from all this. Hopfully I won't have then need to ask for help lol
alright, that trigger looks good! now, go back to your other trigger.
where you have "Unit - Set (Picked unit) custom value 1 to (Custom value 1 of (Picked unit))" above "make picked unit uncommandable" change the (custom value 1 of (picked unit))" to "1" and the custom value array to 0 so it should read, "Unit - Set (Picked unit) custom value 0 to 1.0" You want to set the custom value 0 to 1; not the custom value 1 to 1.
Now, take that, and copy it; then past it twice, right above your action to "make picked unit commandable"
"Unit - Set (Picked unit) custom value 0 to 0.0"
"Unit - Set (Picked unit) custom value 1 to 0.0"
once you have this; it should work properly for you.
As a heads up; you may want to make sure neutral hostile has some sort of minerals, to avoid a conflict. or you can write condition somewhere; this isnt needed at all, but may help reduce lag; should that become a problem. IT may be a non issue though. Dont worry bout it unless it becomes an issue i guess.
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
I think I got this right, check it,
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 0.0
Unit - Set (Picked unit) custom value 0 to 1.0
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Make (Picked unit) Commandable
Else
Default
so very close.
move: "Unit - Set (Picked unit) custom value 0 to 0.0" down to the second part of that trigger; right above "Unit - Make (Picked unit) Commandable"
then, after it is moved, copy and paste it onto itself, so you have 2 of them.
Unit - Set (Picked unit) custom value 0 to 0.0
Unit - Set (Picked unit) custom value 1 to 0.0
Unit - Make (Picked unit) Commandable
then make it like that ^^
overall you want:
Commandbar
Events
Player - Player 1 Minerals changes
Player - Player 2 Minerals changes
Player - Player 3 Minerals changes
Player - Player 4 Minerals changes
Player - Player 5 Minerals changes
Player - Player 6 Minerals changes
Player - Player 7 Minerals changes
Player - Player 8 Minerals changes
Player - Player 9 Minerals changes
Player - Player 10 Minerals changes
Player - Player 11 Minerals changes
Player - Player 12 Minerals changes
Player - Player 13 Minerals changes
Player - Player 14 Minerals changes
Player - Player 15 Minerals changes
Local Variables
Conditions
Or
Conditions
And
Conditions
(Player (Triggering player) Minerals) == 0
Command Disabled[(Triggering player)] == False
And
Conditions
(Player (Triggering player) Minerals) > 0
Command Disabled[(Triggering player)] == True
Actions
General - Switch (Actions) depending on Command Disabled[(Triggering player)]
Cases
General - If (False)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) == 0
Then
Variable - Set Command Disabled[(Triggering player)] = True
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 1.0
Unit - Make (Picked unit) Uncommandable
Else
General - If (True)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
(Player (Triggering player) Minerals) > 0
Then
Variable - Set Command Disabled[(Triggering player)] = False
Unit Group - Pick each unit in (Any units in (Entire map) owned by player (Triggering player) matching Excluded: Heroic, Missile, Dead, Hidden, with at most Any Amount) and do (Actions)
Actions
Unit - Set (Picked unit) custom value 0 to 0.0
Unit - Set (Picked unit) custom value 1 to 0.0
Unit - Make (Picked unit) Commandable
Else
Default
Skype: [email protected] Current Project: Custom Hero Arena! US: battlenet:://starcraft/map/1/263274 EU: battlenet:://starcraft/map/2/186418
Okay, lets see what happens lol
w00t, +1 Rep it works perfectly so far.
Perhaps once i am ready for a good alpha test again, i'll invite you to try it out on battle.net with me and 4 other friends. You can see your handy work you've done for me.