• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] Location Loop

Status
Not open for further replies.
Level 19
Joined
Oct 29, 2007
Messages
1,184
I need help with creating a loop that sets locations all over my map. The locations should be stored as location[array]. I don't want this loop to place the locations all random, but the locations should not be placed in a straight line either. I have attached a picture that shows what I am after. I haven't started making the loop yet, because I am sucky at making loops like this...

I will give +rep to helpful suggestions. :)
 

Attachments

  • Location Spread.JPG
    Location Spread.JPG
    39.4 KB · Views: 95
Level 37
Joined
Mar 6, 2006
Messages
9,240
I created the thing in GUI:

http://www.hiveworkshop.com/forums/pastebin.php?id=5dgmfy

Is this OK?

You can specify the amount of locations, and the distance there needs to be between locations. Note that if you set the distance or amount of locations too high, the trigger loop will never end since there is no free space in the region.

Hit esc to create the locations. Esc also resets things.

EDIT: It basically does what Anachron said.
 
Last edited:
Status
Not open for further replies.
Top