Actually, it might be fairly simple, but I never did it before. How do you create a point or a region via trigger?
For exemple, I have a trigger that spawn a nydus worm whenener an active player unit enter a specific region (which is at a random point in playable area).
I have to create manually each region, name them, and then make a trigger that scatter them all around the map, which is pretty lame. I'm sure there is a was simpler way to do this with variable. I would specifically like to create X number of region and points in random places on playable area.
Hello. I'm not at my home computer at the moment so I'm not sure have I done exactly same trigger on my map earlier but I have done something similiar on my own project. Check out my project "Hand of Humanity" 3rd mission (Click my my "Maps") I did someway similiar trigger on that mission so check it out. (Victoy trigger)
There might be something like "Create Region" trigger.
Actually, it might be fairly simple, but I never did it before. How do you create a point or a region via trigger?
For exemple, I have a trigger that spawn a nydus worm whenener an active player unit enter a specific region (which is at a random point in playable area).
I have to create manually each region, name them, and then make a trigger that scatter them all around the map, which is pretty lame. I'm sure there is a was simpler way to do this with variable. I would specifically like to create X number of region and points in random places on playable area.
Anybody got a light?
What wrong with creating the Nydus worm at some random point in region? Wouldn't that solve your problem instead?I'd just make a big region and have the worm spawn at somee random place. While you can't create regions per se you can add or remove subregions by the RegionAddRect function.
The thing is that the nydus trigger require 2 circular regions of specific size et one point. There is six of these trigger, so 12 regions and 6 points. I have to place everything on the map before I make the trigger and it seem to me that it not a good way to do thing in greater scale. I would like to be able to create the regions and points at map initialisation via trigger...
I want to do a meteo system later which require a grid of points around the map. Placing the points manually would be a pain and be not precise. Thats why im searching for a way to create all this via trigger.
Well, you cant create new regions, but you can attach regions to units. So lets say I attach region to ultralisk. Let's say I'm in a fight. When life -= 100, spawn 20 zerglings @ region. It'll spawn those units at the ultralisk instead. I'd do that instead. :)
Can you create a unit at a specific coordinate on the map (X,Y) ?
If you can, I can make a grid of temporary units and attach all the regions to them and then just disband them in 2 sec. That could work properlly I think and would place all the region \ points at the right spot.
I don't have a comp with me, I'll try when I can. Meanwhile if other have solution or attemps already made, I'm all ears :D
You can create regions using the "Convert Circle to Region" function. If you want to create those regions at map init and use them in events for triggers, then the regions have to be constants.
I used this to create a map with random ambush points, I think it's similar to what you want. See attachment.
I took some time to look at it and it's exactly what I was searching for. Now, I have to work on this
a little because the last thign I need to do it find out how to do the same with "point" and behing able
to place the to (X,Y) coordinate.
__
Edit : it works
Variable
Point Meteo 1 = (Point(30.0, 30.0)) <Point>
Actually, it might be fairly simple, but I never did it before. How do you create a point or a region via trigger?
For exemple, I have a trigger that spawn a nydus worm whenener an active player unit enter a specific region (which is at a random point in playable area).
I have to create manually each region, name them, and then make a trigger that scatter them all around the map, which is pretty lame. I'm sure there is a was simpler way to do this with variable. I would specifically like to create X number of region and points in random places on playable area.
Anybody got a light?
Hello. I'm not at my home computer at the moment so I'm not sure have I done exactly same trigger on my map earlier but I have done something similiar on my own project. Check out my project "Hand of Humanity" 3rd mission (Click my my "Maps") I did someway similiar trigger on that mission so check it out. (Victoy trigger)
There might be something like "Create Region" trigger.
What wrong with creating the Nydus worm at some random point in region? Wouldn't that solve your problem instead?I'd just make a big region and have the worm spawn at somee random place. While you can't create regions per se you can add or remove subregions by the RegionAddRect function.
@Genopath: Go
The thing is that the nydus trigger require 2 circular regions of specific size et one point. There is six of these trigger, so 12 regions and 6 points. I have to place everything on the map before I make the trigger and it seem to me that it not a good way to do thing in greater scale. I would like to be able to create the regions and points at map initialisation via trigger...
I want to do a meteo system later which require a grid of points around the map. Placing the points manually would be a pain and be not precise. Thats why im searching for a way to create all this via trigger.
@Claymuffin: Go
Well, you cant create new regions, but you can attach regions to units. So lets say I attach region to ultralisk. Let's say I'm in a fight. When life -= 100, spawn 20 zerglings @ region. It'll spawn those units at the ultralisk instead. I'd do that instead. :)
@yukaboy: Go
Can you create a unit at a specific coordinate on the map (X,Y) ?
If you can, I can make a grid of temporary units and attach all the regions to them and then just disband them in 2 sec. That could work properlly I think and would place all the region \ points at the right spot.
I don't have a comp with me, I'll try when I can. Meanwhile if other have solution or attemps already made, I'm all ears :D
You can create regions using the "Convert Circle to Region" function. If you want to create those regions at map init and use them in events for triggers, then the regions have to be constants.
I used this to create a map with random ambush points, I think it's similar to what you want. See attachment.
You could create a region, then just move that region to where ever you need it. Then spawn the nydus and move the region to the next needed spot.
@Tolkfan: Go
I took some time to look at it and it's exactly what I was searching for. Now, I have to work on this
a little because the last thign I need to do it find out how to do the same with "point" and behing able
to place the to (X,Y) coordinate.
__
Edit : it works
Variable
Point Meteo 1 = (Point(30.0, 30.0)) <Point>