I've been struggling with this and I just can figure out what would be the best system to use. For a map I am making I have laid out a variety of points at which I would like to spawn certain unit types, say for 30 different points I would like to spawn building X. for another 30 I would like to spawn building Y and for another 30 I would like to spawn building Z. I've tried messing around with variable/arrays but I really don't have a grasp of them yet.
Could anyone help me figure out a way to do this other than making 90 triggers or actions for each individual point?
Do you need 30 specific points for each unit type or 30 random points out of the 90 available? Do your points need to be pre-made or can they just be any random point within a region?
If you want to have the building/units spawn kinda randomly across your map then you can do this. instead of placing a ton of points across your map just make 1 big region of where you want them to spawn. Once the region is in place you can make a trigger like this.
Action
Create X amount of units for player X at (Random point in (Region Name) ) using default settings
I think this is what you are looking for and you can set up as many of those you like for each building/unit you want to make. Also can have it repeat in the events with a periodic event or just fire 1 time depending on what ya need.
If you want to have the building/units spawn kinda randomly across your map then you can do this. instead of placing a ton of points across your map just make 1 big region of where you want them to spawn. Once the region is in place you can make a trigger like this.
Action
Create X amount of units for player X at (Random point in (Region Name) ) using default settings
I think this is what you are looking for and you can set up as many of those you like for each building/unit you want to make. Also can have it repeat in the events with a periodic event or just fire 1 time depending on what ya need.
Hope that helps
That could work if you modify it a little.
Action
Place a while loop here with a integer variable to get it to loop 30 times.
Create 1 of unit for player X at (Random point in (Region Name)) using default settings
No I want what I said in my in post not what the guy under me said. I am making a diplomacy type map and I want all the points (at which I will label cities) to also spawn different types of cities. Different types being small, medium, or large. So for say 30 points i placed on the map and labelled as such, I want to spawn a large city, the same for medium and small city points.
No I want what I said in my in post not what the guy under me said. I am making a diplomacy type map and I want all the points (at which I will label cities) to also spawn different types of cities. Different types being small, medium, or large. So for say 30 points i placed on the map and labelled as such, I want to spawn a large city, the same for medium and small city points.
That's why I asked :)
In that case, create 3 global point variable arrays, one for each type of city (Or one variable with arrays set like [3] [30], the first one for the different types of cities, the second for the number of points). I will call this variable "City." In your initialization trigger set each array designation to a respective point. Yes, you will have to do this for EACH point if you want your cities to be at specific locations. All 90 of them. This makes it possible to create loops to easily spawn the buildings.
When you're ready to spawn your buildings, create a Pick Each Integer loop, going from 1 to 30. Under the loop's actions, create your small cities at point City [1] [Picked Integer]. Create another loop after this one (not inside the previous loop though!) and do the same thing for medium cities (with the point being City [2] [Picked Integer].) Repeat for large cities.
Hi there,
I've been struggling with this and I just can figure out what would be the best system to use. For a map I am making I have laid out a variety of points at which I would like to spawn certain unit types, say for 30 different points I would like to spawn building X. for another 30 I would like to spawn building Y and for another 30 I would like to spawn building Z. I've tried messing around with variable/arrays but I really don't have a grasp of them yet.
Could anyone help me figure out a way to do this other than making 90 triggers or actions for each individual point?
Do you need 30 specific points for each unit type or 30 random points out of the 90 available? Do your points need to be pre-made or can they just be any random point within a region?
@BasharTeg: Go
If you want to have the building/units spawn kinda randomly across your map then you can do this. instead of placing a ton of points across your map just make 1 big region of where you want them to spawn. Once the region is in place you can make a trigger like this.
I think this is what you are looking for and you can set up as many of those you like for each building/unit you want to make. Also can have it repeat in the events with a periodic event or just fire 1 time depending on what ya need.
Hope that helps
That function will create X unit in ONE Random point. Not create 1 unit in a place and ohter in another one.
That could work if you modify it a little.
No I want what I said in my in post not what the guy under me said. I am making a diplomacy type map and I want all the points (at which I will label cities) to also spawn different types of cities. Different types being small, medium, or large. So for say 30 points i placed on the map and labelled as such, I want to spawn a large city, the same for medium and small city points.
That's why I asked :)
In that case, create 3 global point variable arrays, one for each type of city (Or one variable with arrays set like [3] [30], the first one for the different types of cities, the second for the number of points). I will call this variable "City." In your initialization trigger set each array designation to a respective point. Yes, you will have to do this for EACH point if you want your cities to be at specific locations. All 90 of them. This makes it possible to create loops to easily spawn the buildings.
When you're ready to spawn your buildings, create a Pick Each Integer loop, going from 1 to 30. Under the loop's actions, create your small cities at point City [1] [Picked Integer]. Create another loop after this one (not inside the previous loop though!) and do the same thing for medium cities (with the point being City [2] [Picked Integer].) Repeat for large cities.
Done!
thanks mate, didnt mean to bite back at you but everyone below suddenly assumed that was instead what i wanted to do lol.