Get rid fo this ad! Click here to register for your free account.

Welcome to the BF Forums! Register Now, It's Free!

Welcome to the BF Forums; your source for the latest and greatest video game news, strategies, discussions, and resources. Join over 60,000 like-minded gamers from around the world to chat about your interests in our community.

You are currently viewing the forums as a guest user, which limits your access to certain content, contests, downloads, and more. By joining our free community, you will be able to respond in discussions/articles, contact members privately (PM), participate in regular-scheduled contests, see less advertisements, and have access to many other features. Registration is quick, easy, and completely free.

Have your questions answered. Share your thoughts about a topic. Take 2 minutes, Register Now!
Register for free today, and these ads will disappear!
BattleForums.com Forums > Major Games > Warcraft > Warcraft Maps and Modifications

##Click Here## | BF Lotto: $50 Ebay or Amazon Gift Card - A Single Click is All It Takes...

Reply
 
Thread Tools Display Modes
Old 02-22-2008, 09:38 AM   #1 (permalink)
BattleForums Newbie
 
Join Date: Feb 2008
Posts: 3
Random Point In Region always the same?

I am making a map where there are a bunch of towers placed randomly along the map. After a few tests though, I noticed that each time the towers where placed at the same spots. Any help?
Place Units
Events
Map initialization
Conditions
Actions
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Unit - Create 1 Scout Tower for Neutral Hostile at (Random point in (Playable map area)) facing Default building facing degrees
Labmonkey123 is offline   Reply With Quote
Alt Heute
Advertising

Beitrag Sponsored Links

__________________
Ads suck! Take 2 minutes to register for your free account, and GET RID OF THESE ADS!
   
Old 02-22-2008, 03:20 PM   #2 (permalink)
[ Official Forum Ninja ]
 
Ninja_Blue's Avatar
 
Join Date: Sep 2006
Location: Roanoke VA
Posts: 1,404
Re: Random Point In Region always the same?

Use zones.
__________________
Xenocult
Ninja_Blue is offline   Reply With Quote
Old 02-22-2008, 06:17 PM   #3 (permalink)
BattleForums Newbie
 
Join Date: Feb 2008
Posts: 3
Re: Random Point In Region always the same?

??? Please explain.
Labmonkey123 is offline   Reply With Quote
Old 02-23-2008, 12:30 AM   #4 (permalink)
[F-Zero Fanatic]
 
Chris's Avatar
 
Join Date: May 2003
Location: Phantom Road
Age: 22
Posts: 15,333
Re: Random Point In Region always the same?

It's strange, it couldnt be coincidence.

When you restart, do you hit the restart button? Or do you close the Wc3 and then retest the map?
What you could also do is this:

Have an integer variable and random a number between like 1 and 4. And another one to track the number of times this function is called.
Have 4 Regions or "Zones" as ninja said splitting the map into 4 parts.
If say 1 was drawn, create a scout tower at a random location at Region1. And do it as many times as
necessary. Adding 1 to the flag each time till a number is met (like check for calls < 15 or something).

The problem is, you might be using that playable map area spot.

Try that and see if it works. I know it works cause one campaign I have does this with a certian quest. It involved finding an item but it was never in the same spot each playthrough. This is my theory on how it was done. And I wish I could supply you with triggers and conditions, but I have a hard time piecing them together, even though I can do it logically.
__________________


The Purpose of DTD is not to show off how good you are.
But to do an insane flying move and landing at 3000 km/h.
Hopefully, without crashing into something or flying off in the process.

Hellwolf_36@D2Maniacs
Jessica_McAllen - Zy-el Bowazon - Level 19 of 10000
Chris is online now   Reply With Quote
Old 02-24-2008, 01:22 PM   #5 (permalink)
BattleForums Newbie
 
Join Date: Feb 2008
Posts: 3
Re: Random Point In Region always the same?

yes, I was thinking of doing something like that, but warcraft random numbers are not very good. It uses premade things in the map that are always the same, so while you get a pretty random number but it is the same every time. I changed the idea of my map to work around this, but i might make the original one if i get a way around that problem.
Labmonkey123 is offline   Reply With Quote
Old 02-24-2008, 03:59 PM   #6 (permalink)
[F-Zero Fanatic]
 
Chris's Avatar
 
Join Date: May 2003
Location: Phantom Road
Age: 22
Posts: 15,333
Re: Random Point In Region always the same?

Well, when you generate a random number, you need to specify a range. The problem is you will most likely get the same number, if the range is small. The other problem is it doesnt reset the numbers when the map restarts, which isn't a good thing to do. However, that is the second best idea.
__________________


The Purpose of DTD is not to show off how good you are.
But to do an insane flying move and landing at 3000 km/h.
Hopefully, without crashing into something or flying off in the process.

Hellwolf_36@D2Maniacs
Jessica_McAllen - Zy-el Bowazon - Level 19 of 10000
Chris is online now   Reply With Quote
 
Reply

« The noob needs help again :D | DOWNLOADS SECTION »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -4. The time now is 11:59 PM.



Powered by vBulletin® Version 3.7.2 | Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0