Have an idea for a map that I need some help with. Appreciate any ideas / help creating a trigger.
The map is like a chessboard. Each square is a region and the game is played from square to square. There are 100 squares and each one contains a resource (gold, lumber, food) or nothing. I have a test map (included) where I created the array and can trigger the creation of a unit in a random region. More or less working... but with a few critical flaws.
I need a trigger that creates a random resource inside of each square without the trigger creating more than one resource in each. So either I need some additional variables / arrays or I am going to have to trigger each and every single region. Right now, I have it set so that it picks a random region (to reduce the amount of triggers needed) but that really adds to the duplicating issue.
Surely there is an easier way?
Step by step example:
1: Game is loaded
2: 100 regions load / variables attached
3: trigger to create resources runs
4: trigger picks region 1 - creates tree
5: trigger picks region 2 - creates mine
6: trigger picks region 3 - creates nothing
7: trigger picks region 4 - creates food
8: trigger repeats until every region has had a chance at creating a resource
9: trigger ends, moves on to other map functions...
The map is like a chessboard. Each square is a region and the game is played from square to square. There are 100 squares and each one contains a resource (gold, lumber, food) or nothing. I have a test map (included) where I created the array and can trigger the creation of a unit in a random region. More or less working... but with a few critical flaws.
I need a trigger that creates a random resource inside of each square without the trigger creating more than one resource in each. So either I need some additional variables / arrays or I am going to have to trigger each and every single region. Right now, I have it set so that it picks a random region (to reduce the amount of triggers needed) but that really adds to the duplicating issue.
Surely there is an easier way?
Step by step example:
1: Game is loaded
2: 100 regions load / variables attached
3: trigger to create resources runs
4: trigger picks region 1 - creates tree
5: trigger picks region 2 - creates mine
6: trigger picks region 3 - creates nothing
7: trigger picks region 4 - creates food
8: trigger repeats until every region has had a chance at creating a resource
9: trigger ends, moves on to other map functions...