Spawn Bonus Minerals Fast
Events
Timer - Every Mineral Spawn Rate Fast seconds of Game Time
Local Variables
index = 0 <Integer>
team = 0 <Integer>
Conditions
Actions
Variable - Modify NMinerals: + 1
Text Tag - Hide TextTag for (All players)
Text Tag - Destroy TextTag
General - For each integer index from 1 to NPlayers with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
AnyUnitInRegion(index, Bonus Minerals)
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
isTeam == True
Then
Variable - Set team = (GetTeam(index))
Player - Modify player Teams[team][1] Minerals: Add NMinerals
Player - Modify player Teams[team][2] Minerals: Add NMinerals
Else
Player - Modify player index Minerals: Add NMinerals
Text Tag - Create a text tag with the text (Combine (("Player " + (Text(index))))) for (All players), using a font size of 24, at (Center of Bonus Minerals) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Variable - Set TextTag = (Last created text tag)
Variable - Set NMinerals = 0
Else
Text Tag - Create a text tag with the text (Combine (("Minerals" + (Text(NMinerals))))) for (All players), using a font size of 24, at (Center of Bonus Minerals) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Variable - Set TextTag = (Last created text tag)
Nope cant find anything. Here is the AnyUnitInRegion condition def.
AnyUnitInRegion
Options: Condition
Return Type: Boolean
Parameters
Player = 0 <Integer>
Region = No Region <Region>
Grammar Text: AnyUnitInRegion(Player, Region)
Hint Text: (None)
Custom Script Code
Local Variables
Units = (Empty unit group) <Unit Group>
Actions
Variable - Set Units = (Any units in Region owned by player Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in Units) > 0
Then
General - Return True
Else
General - Return False
This is what I have.
What is wrong?
Spawn Bonus Minerals Fast
Events
Timer - Every Mineral Spawn Rate Fast seconds of Game Time
Local Variables
index = 0 <Integer>
team = 0 <Integer>
Conditions
Actions
Variable - Modify NMinerals: + 1
Text Tag - Hide TextTag for (All players)
Text Tag - Destroy TextTag
General - For each integer index from 1 to NPlayers with increment 1, do (Actions)
Actions
General - If (Conditions) then do (Actions) else do (Actions)
If
AnyUnitInRegion(index, Bonus Minerals)
Then
General - If (Conditions) then do (Actions) else do (Actions)
If
isTeam == True
Then
Variable - Set team = (GetTeam(index))
Player - Modify player Teams[team][1] Minerals: Add NMinerals
Player - Modify player Teams[team][2] Minerals: Add NMinerals
Else
Player - Modify player index Minerals: Add NMinerals
Text Tag - Create a text tag with the text (Combine (("Player " + (Text(index))))) for (All players), using a font size of 24, at (Center of Bonus Minerals) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Variable - Set TextTag = (Last created text tag)
Variable - Set NMinerals = 0
Else
Text Tag - Create a text tag with the text (Combine (("Minerals" + (Text(NMinerals))))) for (All players), using a font size of 24, at (Center of Bonus Minerals) and height offset 1.0, initially Visible, and fog of war enforcement set to False
Variable - Set TextTag = (Last created text tag)
Might have found something.
Nope cant find anything. Here is the AnyUnitInRegion condition def.
AnyUnitInRegion
Options: Condition
Return Type: Boolean
Parameters
Player = 0 <Integer>
Region = No Region <Region>
Grammar Text: AnyUnitInRegion(Player, Region)
Hint Text: (None)
Custom Script Code
Local Variables
Units = (Empty unit group) <Unit Group>
Actions
Variable - Set Units = (Any units in Region owned by player Player matching Excluded: Missile, Dead, Hidden, with at most Any Amount)
General - If (Conditions) then do (Actions) else do (Actions)
If
(Number of Living units in Units) > 0
Then
General - Return True
Else
General - Return False
Fixed it I was creating the text tag in the loop XD.