I was wondering what the trigger was to make something random.(In this case: I want it to be a rare creature that spawns if a number is picked from a random group of numbers.
Try using an integer variable, and make the trigger set the variable to "random integer" between x and y, then have the trigger check if the variable is a certain number (use if then else, you can use "or" conditions to make something like Variable <50 OR >40, to have it work every time the variable is set to a number between 40 and 50) and then have it execute all actions, in this case spawning the unit. If you want it to spawn on a random location, i think you can use at "point with polar offset", make the angle "random angle" and the offset "random integer" and then just have it calculate that from a certain preset point on the map (make sure the random integer isnt too big if you want your spawn to be in a certain area. Simplest points you can use are "center of region" if you want a certain area or "Center of map" if you dont care where it spawns)
Im pretty sure that should work. You'll have to play around with numbers though.
If im unclear, ill check back later here and repeat everything, but with the editor open so that i can tell you the things exact to the letter (or make a trigger, screenshot, and post it here)
I was wondering what the trigger was to make something random.(In this case: I want it to be a rare creature that spawns if a number is picked from a random group of numbers.
Try using an integer variable, and make the trigger set the variable to "random integer" between x and y, then have the trigger check if the variable is a certain number (use if then else, you can use "or" conditions to make something like Variable <50 OR >40, to have it work every time the variable is set to a number between 40 and 50) and then have it execute all actions, in this case spawning the unit. If you want it to spawn on a random location, i think you can use at "point with polar offset", make the angle "random angle" and the offset "random integer" and then just have it calculate that from a certain preset point on the map (make sure the random integer isnt too big if you want your spawn to be in a certain area. Simplest points you can use are "center of region" if you want a certain area or "Center of map" if you dont care where it spawns)
Im pretty sure that should work. You'll have to play around with numbers though. If im unclear, ill check back later here and repeat everything, but with the editor open so that i can tell you the things exact to the letter (or make a trigger, screenshot, and post it here)
Thanks for the help! :D It worked. I thinkish.
http://www.sc2mapster.com/maps/random-unit-random-region/
To make things easier, you can use this chance function I just made.
chance(chance, outOf)
chance(20, 100) would be 20%
chance(20, 1000) would be 2%
chance(1, 2) would be 50%
Thanks everyone and thanks for map. Another question for those who know about traceline and shooters, http://forums.sc2mapster.com/development/map-development/5637-traceline-fps-attack-problem/#p6 .