I've been using the create unit at random point in region function, however, my map has unpathable cliffs which the trigger still thinks is a valid point to include in its search so when it happens to choose a point on a cliff instead of just choosing another point or creating the unit to the closest nearby pathable point it just doesnt create the unit at all.
My question is how would I make the trigger create a unit anywhere on the map randomly, excluding cliffs.
I have tried many things but none have worked.
The function I am using completely ignores painted pathing, dynamic pathing, etc.
Any help appreciated, thanks.
Edit: Using complex regions and many points would not be reasonable for my large map with many unique cliff placements/shapes. Looking for a trigger fix not a complicated terrain one.
This function will return a pathable point on the map.
I'm assuming you're using the GUI. point is passable and repeat forever are both listed in the GUI if you search for them. I'm not sure what the function names would be in Galaxy, but you can do the same.
use an "create unit" effect at random point of map. this will automatically create the unit at the closest point possible.
use catalog triggers to set the unittype of the effect first.
This function will return a pathable point on the map.
I'm assuming you're using the GUI. point is passable and repeat forever are both listed in the GUI if you search for them. I'm not sure what the function names would be in Galaxy, but you can do the same.
Tried this but the effect is still the same, I don't think the function cares lol.
use an "create unit" effect at random point of map. this will automatically create the unit at the closest point possible.
use catalog triggers to set the unittype of the effect first.
I get the create effect part but what do you mean use catalog triggers to set the unit type? Isn't that part of the effect already?
you are lucky, i am nice today
left click to spawn a space marine at a random location on the map, everything except the grey areas are unpathable.
Oddly enough this still doesn't work with cliffs. I surrounded your map with cliffs and made only the middle(non-cliff part) pathable and left click to spawn marines only works less than half the time because the effect is still triggering in a random point within the unpathable parts on cliffs.
Not sure why the editor hates cliffs but yeah. Without cliffs I could just revert back to the normal create unit function but with cliffs no methods seem to work.
you have to check the flag "ignore clifftest" in order to spawn units at closest point possible ignoring the cliff level.
can you post your map with cliffs? i have no problems here.
the big advantage of the effect solution is that you dont have to find an alternativ point if a condition fails. it falls back to an blizz algorithm (which is hopefully most effient).
you have to check the flag "ignore clifftest" in order to spawn units at closest point possible ignoring the cliff level.
can you post your map with cliffs? i have no problems here.
the big advantage of the effect solution is that you dont have to find an alternativ point if a condition fails. it falls back to an blizz algorithm (which is hopefully most effient).
Thanks everyone, I think this is working perfectly now, after fixing that flag.
I've been using the create unit at random point in region function, however, my map has unpathable cliffs which the trigger still thinks is a valid point to include in its search so when it happens to choose a point on a cliff instead of just choosing another point or creating the unit to the closest nearby pathable point it just doesnt create the unit at all.
My question is how would I make the trigger create a unit anywhere on the map randomly, excluding cliffs.
I have tried many things but none have worked.
The function I am using completely ignores painted pathing, dynamic pathing, etc.
Any help appreciated, thanks.
Edit: Using complex regions and many points would not be reasonable for my large map with many unique cliff placements/shapes. Looking for a trigger fix not a complicated terrain one.
Use the "point is pathable" function to test if it is pathable to ground units.
This function will return a pathable point on the map.
I'm assuming you're using the GUI. point is passable and repeat forever are both listed in the GUI if you search for them. I'm not sure what the function names would be in Galaxy, but you can do the same.
use an "create unit" effect at random point of map. this will automatically create the unit at the closest point possible.
use catalog triggers to set the unittype of the effect first.
Tried this but the effect is still the same, I don't think the function cares lol.
I get the create effect part but what do you mean use catalog triggers to set the unit type? Isn't that part of the effect already?
yes but you can use catalogs to change the unittype if needed.
I set it up but I get errors. I tried setting the target origin and location on the effects to point instead of unit but no change.
you are lucky, i am nice today
left click to spawn a space marine at a random location on the map, everything except the grey areas are unpathable.
Oddly enough this still doesn't work with cliffs. I surrounded your map with cliffs and made only the middle(non-cliff part) pathable and left click to spawn marines only works less than half the time because the effect is still triggering in a random point within the unpathable parts on cliffs.
Not sure why the editor hates cliffs but yeah. Without cliffs I could just revert back to the normal create unit function but with cliffs no methods seem to work.
You could use the 'cliff level of point' or 'height of point' conditions.
Can we see the trigger? finiteturtles's suggestion should have worked.
you have to check the flag "ignore clifftest" in order to spawn units at closest point possible ignoring the cliff level.
can you post your map with cliffs? i have no problems here.
the big advantage of the effect solution is that you dont have to find an alternativ point if a condition fails. it falls back to an blizz algorithm (which is hopefully most effient).
Thanks everyone, I think this is working perfectly now, after fixing that flag.