HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Randomization

08-14-2007, 11:41 AM#1
Zanam
Hello again folks. I have run into an issue regarding the trigger editor's Random actions, and hope I can get some help.

I'm trying to randomize start locations for my map, making each game unique in the sense that you don't always start in the same place. To do this, I've begun experimenting with random points... but the trigger doesn't seem to be random at all. Every time you start the map, the 'random' locations are always in the same places. Also, I'm trying to make sure that starting locations aren't too close together, but it seems to be ignoring that condition as well. Attached is the 'randomizer' trigger thus far.

The StartLoc (the dummy) is just a dummy unit used in another trigger to represent the start location.
Attached Images
File type: jpgtrig.JPG (50.2 KB)
08-16-2007, 09:48 PM#2
Histenchist
Use trigger tags.
([trigger][/TRIGGERR]) No R in the last ;)

I think it will be random if you test it on B-net.
08-16-2007, 09:56 PM#3
cohadar
Random functions always use the same random numbers when you start your map from World Editor.

Only when you play the map randoms get truly random.
(I guess it would be stupid to say that pseudorandoms get truly pseudorandom )
08-16-2007, 10:04 PM#4
Pytho
Quote:
Originally Posted by cohadar
Random functions always use the same random numbers when you start your map from World Editor.

As far as I know you can turn this off in the Preferences->test map (or similar called)->uncheck the checkbox
08-16-2007, 10:26 PM#5
cohadar
Not all version of WE have this option,
mine for example.
08-16-2007, 10:27 PM#6
Vexorian
Which is strange considering this option was available even in the RoC retail world editor...
08-16-2007, 10:39 PM#7
cohadar
Strange indeed...

Hidden information:

Zoom (requires log in)
Attached Images
File type: jpgprefs.JPG (21.9 KB)
08-16-2007, 10:52 PM#8
Pytho
looks like you are wrong. It's file->Preferences and there a Tab called "test map" or something similar (have german version so I don't know exactly).
08-16-2007, 10:59 PM#9
cohadar
Lol found it.
I always thought it was map preference ....

This is soo cool didn't even know I had all these options...
08-17-2007, 01:15 PM#10
Zanam
Well, it seems the world editor fixed randomness is true, however my 3000 range buffer for preventing start locations to be too close to each other is still being ignored. See the first post for the code, I'm still not familiar with how this trigger forum tag works.

It is a fairly simple loop, checking for the number of units in a 3000 range of a point, and performing actions if that number is zero... My only problem is, it's performing even if it is not zero.

EDIT: Well, I think i've made progress... my startloc dummy had Locust, which I think was making him undetectable by the trigger. However, now that he's a normal unit, it crashes the game when the trigger runs. Any suggestions?

EDIT2: A simple Wait .1 seconds fixed that bug. All set to go now! :D
08-17-2007, 01:46 PM#11
Vexorian
btw, your trigger is full of leaks.
08-17-2007, 10:00 PM#12
Zanam
Well aware, those get fixed later. Just creating the basis of the system right now, i'll tweak it when it gets closer to being finished.

I'll probably be back asking a few questions regarding the perfect ways to do certain triggers when that time comes... I've been only recently reading up on the tutorials on proper anti-leak scripting.