🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece!🔗 Click here to enter!
There are all the functions in GUI you need.
An idea would be to store all Regions into an array, then get a random integer between 0 and the number of rects you stored.
Now that you got your random Region, you use GetRandomPoint in Rect and- voila, random point in random Rect.
Then use a random Region by Choosing a random index for the array.
Actions
Unit - Create 1 Footman for Player 1 (Red) at (Random point in Region_Array[(Random integer number between 0 and 3)]) facing Default building facing degrees
You also have to set the Regions before in some init trigger, but I think you can do that.
Make sure 0 and 1 is different
Your array start from what number and ends from what number ?
If you have 16 regions and the starting number is [1], your last number would be [16]
But if you start at [0], your last number would be [15]
I don't meant the difference between "quantity", what I meant was difference in "array referencing" where you should do math random number between 0 ~ 16 but instead, you did 1 ~ 16, it's wrong (this situation occurs if your starting array number is [0], if it's [1], it should work fine)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.