Here is the trigger. If this is too much to read... read the 2nd code its the same system just a lot smaller.
What is happening is whenever p1/p2/p3/p4 enters the region it spawns 10 every time... It's like it doesn't know how to count the spiders already in the region and just spawns 10...
And yes i know im using the right regions so thats not the problem.
Here is a trigger that is basically the same function as this but a lot smaller. (this is what it was in the first place, before i broke it up thinking it would at least tell me where it was breaking --
Code:
Spawning Spiders
Events
Unit - A unit enters Ashen Spider Region <gen>
Conditions
(Number of units in (Units of type Spider Ashen)) Less than or equal to 10
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 0
Then - Actions
Unit - Create 10 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Neutral Hostile)) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 1
Then - Actions
Unit - Create 9 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 2
Then - Actions
Unit - Create 8 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 3
Then - Actions
Unit - Create 7 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 4
Then - Actions
Unit - Create 6 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 5
Then - Actions
Unit - Create 5 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 6
Then - Actions
Unit - Create 4 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 7
Then - Actions
Unit - Create 3 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 8
Then - Actions
Unit - Create 2 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in (Units in Ashen Spider Region <gen> matching ((Owner of (Picked unit)) Equal to Player 11 (Dark Green)))) Equal to 9
Then - Actions
Unit - Create 1 Spider Ashen for Player 11 (Dark Green) at (Center of Spider Cave Exit Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Spider Cave Exit Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Spider Region <gen>)
Else - Actions
What is happening is whenever p1/p2/p3/p4 enters the region it spawns 10 every time... It's like it doesn't know how to count the spiders already in the region and just spawns 10...
And yes i know im using the right regions so thats not the problem.
Here is a trigger that is basically the same function as this but a lot smaller. (this is what it was in the first place, before i broke it up thinking it would at least tell me where it was breaking --
Code:
Spawning Furblog
Events
Unit - A unit enters Ashen Furblogs Region <gen>
Conditions
(Number of units in (Units in Ashen Furblogs Region <gen>)) Less than or equal to 5
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Actions
Unit - Create (0 + (5 - (Number of units in (Units in Ashen Furblogs Region <gen> matching ((Matching player) Equal to Player 11 (Dark Green)))))) Furbolg Ashen for Player 11 (Dark Green) at (Random point in Ashen Furblog Spawn <gen>) facing Default building facing degrees
Unit Group - Pick every unit in (Units in Ashen Furblog Spawn <gen> matching ((Owner of (Matching unit)) Equal to Player 11 (Dark Green))) and do (Actions)
Loop - Actions
Unit - Order (Picked unit) to Patrol To (Random point in Ashen Furblogs Region <gen>)