[Log in / Register]
| News | Chat | Pastebin | Donations | Tutorials | Rules | Forums |
| Maps | Skins | Icons | Models | Spells | Tools | Jass | Packs | Hosted Projects | Starcraft II Modding | Starcraft II Resources | Galaxy Wiki |
(Keeps Hive Alive)
Go Back   The Hive Workshop > Warcraft III Modding > Map Development


Map Development Discuss your developing maps. Release beta tests and get useful feedback before the final release. If your map is fully complete or is a late Beta, then it can be uploaded directly to our Maps Section. Otherwise, attach the map to your post. This is NOT a forum to ask questions about the Editor!

Closed Thread
 
Thread Tools
Old 10-19-2005, 02:01 AM   #1 (permalink)
Registered User IHATEHIPPIES
User
 
Join Date: Aug 2005
Posts: 13
IHATEHIPPIES is an unknown quantity at this point (0)
WC3's Random Number Generator

I'm having a hard time using WC3's random number generator. Everytime I test the map, it spurts out the same numbers, and therefore the same results. I've re-written my triggers 3 times, and it has become clear that they are not to blame.

The map used to be quite random. Does anyone have any ideas about what might cause this? I can post the triggers, but I don't think they caused it.
IHATEHIPPIES is offline  
Old 10-19-2005, 04:18 AM   #2 (permalink)
Registered User Claudz
User
 
Claudz's Avatar
 
Join Date: Dec 2004
Posts: 181
Claudz has little to show at this moment (9)
It just happnes.. happened to me many times to. Just like random names on heroes get's the same! It's somthing with the test map in editor, i dosent happen when u play map for real! :lol:
__________________
Claudz is offline  
Old 10-19-2005, 04:28 AM   #3 (permalink)
Registered User VGsatomi
Former Wc3sear.ch Administrator
 
VGsatomi's Avatar
Webmaster's Council
 
Join Date: May 2004
Posts: 3,175
VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)
Medal of Honor: This user has proven himself through his deeds and contributions on wc3sear.ch and/or The Hive Workshop, and is thus awarded this Medal of Honor in adulation of his perpetual legend. Former Staff Member: This user used to be on the Hive Workshop staff. 
That only happens when you play the map through the "test map" feature in the world editor. It will always generate the same variables, even if random. If you really want to test triggers with random variables/numbers, play the map normally by opening wc3 and selecting the map in-game.
-VGsatomi
__________________
VGsatomi is offline  
Old 10-19-2005, 12:27 PM   #4 (permalink)
Registered User IHATEHIPPIES
User
 
Join Date: Aug 2005
Posts: 13
IHATEHIPPIES is an unknown quantity at this point (0)
Quote:
Originally Posted by VGsatomi
That only happens when you play the map through the "test map" feature in the world editor. It will always generate the same variables, even if random. If you really want to test triggers with random variables/numbers, play the map normally by opening wc3 and selecting the map in-game.
-VGsatomi
No, I was playing normally, not thru the test map feature.
IHATEHIPPIES is offline  
Old 10-19-2005, 01:39 PM   #5 (permalink)
Registered User N00byStance
I invoke thee
 
N00byStance's Avatar
 
Join Date: Jul 2005
Posts: 1,082
N00byStance has little to show at this moment (38)N00byStance has little to show at this moment (38)N00byStance has little to show at this moment (38)N00byStance has little to show at this moment (38)
You can turn off generating constant random numbers in editor. Go to File -> Preferences, then to Map testing (or something near, I have localized Wc3) tab and uncheck "Use blahblahblah".
__________________
www.clancbs.com
N00byStance is offline  
Old 10-19-2005, 04:57 PM   #6 (permalink)
Registered User VGsatomi
Former Wc3sear.ch Administrator
 
VGsatomi's Avatar
Webmaster's Council
 
Join Date: May 2004
Posts: 3,175
VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)
Medal of Honor: This user has proven himself through his deeds and contributions on wc3sear.ch and/or The Hive Workshop, and is thus awarded this Medal of Honor in adulation of his perpetual legend. Former Staff Member: This user used to be on the Hive Workshop staff. 
Well, again, thats a world editor feature.

Quote:
No, I was playing normally, not thru the test map feature.
If its happening in game after launching normally, then something is messed up with your triggering. Try posting the triggers.
-VGsatomi
__________________
VGsatomi is offline  
Old 10-19-2005, 09:01 PM   #7 (permalink)
Registered User IHATEHIPPIES
User
 
Join Date: Aug 2005
Posts: 13
IHATEHIPPIES is an unknown quantity at this point (0)
Quote:
Originally Posted by VGsatomi
If its happening in game after launching normally, then something is messed up with your triggering. Try posting the triggers.
-VGsatomi
I'm pretty sure it's not the triggers, but I shall post them. There are 10 triggers (One for every player in the map). They are slightly different, but they all follow this basic code, shown below.

Events
: Is activated by another trigger via the "run trigger" function.

Conditions
: None

Actions
: Set PlayerSlotCaptain = RaceTerran(Random Integer between 1 and 10)
: If (All Conditions are true) Then do (Actions) Else (Actions)
: If - Conditions
: PlayerSlotCaptain slot status != to is playing
: Then - Actions
: Trigger Run (This Trigger)
: Else - Actions
: Trigger Run (Next Random Trigger)

Note: I have used several RND triggers, and these are the latest.
IHATEHIPPIES is offline  
Old 10-20-2005, 02:04 AM   #8 (permalink)
Registered User VGsatomi
Former Wc3sear.ch Administrator
 
VGsatomi's Avatar
Webmaster's Council
 
Join Date: May 2004
Posts: 3,175
VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)
Medal of Honor: This user has proven himself through his deeds and contributions on wc3sear.ch and/or The Hive Workshop, and is thus awarded this Medal of Honor in adulation of his perpetual legend. Former Staff Member: This user used to be on the Hive Workshop staff. 
Okay, here's your problem: You are setting your "PlayerSlotCaptain" variable to be a random intiger...but you are not using random intiger variables in your if/then/else conditions...and instead using player position status. It wont work that way. Here's how what trigger would work:

Set PlayerSlotCaptain = RaceTerran(Random Integer between 1 and 10)

If: PlayerSlotCaptain = 1
Then: actions
Else: actions

If: PlayerSlotCaptain = 2
Then: actions
Else: actions

(Actions would be assigning the payer captain status, however you plan to do that. repeat until all 10 possible random actions are covered)
-VGsatomi
__________________
VGsatomi is offline  
Old 10-20-2005, 03:16 AM   #9 (permalink)
Registered User IHATEHIPPIES
User
 
Join Date: Aug 2005
Posts: 13
IHATEHIPPIES is an unknown quantity at this point (0)
Quote:
Originally Posted by VGsatomi
Okay, here's your problem: You are setting your "PlayerSlotCaptain" variable to be a random intiger...but you are not using random intiger variables in your if/then/else conditions...and instead using player position status. It wont work that way. Here's how what trigger would work:

Set PlayerSlotCaptain = RaceTerran(Random Integer between 1 and 10)

If: PlayerSlotCaptain = 1
Then: actions
Else: actions

If: PlayerSlotCaptain = 2
Then: actions
Else: actions

(Actions would be assigning the payer captain status, however you plan to do that. repeat until all 10 possible random actions are covered)
-VGsatomi
I don't think that will work because PlayerSlotCaptain isn't an integer variable, it is a player variable, which means it can't equal a number. I could, of course, create another variable just for that. I'll try that tommorow, but I remember doing something like that, and it didn't work.

Anyway, to make sure its clear, the variables PlayerSlotCaptain, and RaceTerran [Array] are player variables. The trigger is designed to give the "Captain Rank" to 1 random player, out of 10 players.
IHATEHIPPIES is offline  
Old 10-20-2005, 03:57 AM   #10 (permalink)
Registered User VGsatomi
Former Wc3sear.ch Administrator
 
VGsatomi's Avatar
Webmaster's Council
 
Join Date: May 2004
Posts: 3,175
VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)
Medal of Honor: This user has proven himself through his deeds and contributions on wc3sear.ch and/or The Hive Workshop, and is thus awarded this Medal of Honor in adulation of his perpetual legend. Former Staff Member: This user used to be on the Hive Workshop staff. 
So you are setting a player variable as a random intiger? Still won't work, because player variables don't use intigers. You need to fix your triggering.
-VGsatomi
__________________
VGsatomi is offline  
Old 10-20-2005, 05:26 AM   #11 (permalink)
Registered User N00byStance
I invoke thee
 
N00byStance's Avatar
 
Join Date: Jul 2005
Posts: 1,082
N00byStance has little to show at this moment (38)N00byStance has little to show at this moment (38)N00byStance has little to show at this moment (38)N00byStance has little to show at this moment (38)
Doesn't he want to spawn creeps for random player? I think he tries to assign a random player from array and then spawn creeps for him. So then:

RaceTerran is a player array
RaceTerran[Random integer number between 1 and 10] returns random player
__________________
www.clancbs.com
N00byStance is offline  
Old 10-20-2005, 09:46 PM   #12 (permalink)
Registered User IHATEHIPPIES
User
 
Join Date: Aug 2005
Posts: 13
IHATEHIPPIES is an unknown quantity at this point (0)
Quote:
Originally Posted by VGsatomi
So you are setting a player variable as a random intiger? Still won't work, because player variables don't use intigers. You need to fix your triggering.
-VGsatomi
No, the variable RaceTerran is an array, and that array uses the integer to determine what player it affects.

Quote:
RaceTerran is a player array
RaceTerran[Random integer number between 1 and 10] returns random player
Thats the idea.
IHATEHIPPIES is offline  
Old 10-21-2005, 12:26 AM   #13 (permalink)
Registered User VGsatomi
Former Wc3sear.ch Administrator
 
VGsatomi's Avatar
Webmaster's Council
 
Join Date: May 2004
Posts: 3,175
VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)VGsatomi is a glorious beacon of light (451)
Medal of Honor: This user has proven himself through his deeds and contributions on wc3sear.ch and/or The Hive Workshop, and is thus awarded this Medal of Honor in adulation of his perpetual legend. Former Staff Member: This user used to be on the Hive Workshop staff. 
This is the last time I am going to point your error out to you, then I am just going to ignore you.

: Set PlayerSlotCaptain = RaceTerran(Random Integer between 1 and 10) <----is setting an intiger variable
: If (All Conditions are true) Then do (Actions) Else (Actions)
: If - Conditions
: PlayerSlotCaptain slot status != to is playing <----player slot status comprison has nothing to do with intigers.

That is whats called a "conflictance". It wont work. You are setting up the wrong conditions for the variable.

-VGsatomi
__________________
VGsatomi is offline  
Old 10-21-2005, 12:35 AM   #14 (permalink)
Registered User IHATEHIPPIES
User
 
Join Date: Aug 2005
Posts: 13
IHATEHIPPIES is an unknown quantity at this point (0)
Quote:
Originally Posted by VGsatomi
This is the last time I am going to point your error out to you, then I am just going to ignore you.

: Set PlayerSlotCaptain = RaceTerran(Random Integer between 1 and 10) <----is setting an intiger variable
: If (All Conditions are true) Then do (Actions) Else (Actions)
: If - Conditions
: PlayerSlotCaptain slot status != to is playing <----player slot status comprison has nothing to do with intigers.

That is whats called a "conflictance". It wont work. You are setting up the wrong conditions for the variable.

-VGsatomi
I acutally figured it out. It has nothing to do with the variables. While the trigger is running I have cinematic mode activated for all palyers. I tried turning off cinematic mode, and the triggers worked perfectly. Appearently Cinematic mode uses the same random numbers. I suppose Blizzard did this because they were worried the RND would mess with the cinematic.

BTW, that is not a conflictance, the RND is affecting the Array number (which is an integer) not the player variable.
IHATEHIPPIES is offline  
Closed Thread

Bookmarks

Thread Tools

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 Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Supermj's Random Terrain Generator Supermj Map Development 31 03-04-2008 01:10 AM
Random Terrain Generator Chaos Overlord Triggers & Scripts 6 07-06-2007 06:41 PM
Random Dungeon Generator SuperDuperGuy Map Development 0 12-10-2005 12:39 AM

All times are GMT. The time now is 07:02 AM.




Powered by vBulletin
Copyright 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.5.1 PL2
Copyright © Ralle