Fortress Forever

Go Back   Fortress Forever > Editing > Mapping

Reply
 
Thread Tools Display Modes
Old 10-20-2006, 02:14 AM   #1
o_imbrifer
 
o_imbrifer's Avatar
 
Join Date: May 2005
Location: Changes every few months
Posts Rated Helpful 0 Times
How do you generate a random number?

Wondering which entity in HL2 generates a random number. I want to pick a random command point (between 3) which players have to capture ever 120 seconds, and I can't figure out how to do it.

Any suggestions are more than welcome.

Hugs and all that
o_imbrifer is offline   Reply With Quote


Old 10-20-2006, 04:05 AM   #2
o_a boojum snark
 
o_a boojum snark's Avatar
 
Join Date: Jan 2005
Location: Orion Arm
Posts Rated Helpful 0 Times
Not sure how you need to do stuff exactly, but this is the the entity for triggering a particular random thing from many options.
o_a boojum snark is offline   Reply With Quote


Old 10-20-2006, 07:19 PM   #3
o_dr zauis
 
o_dr zauis's Avatar
 
Join Date: Feb 2005
Location: Philadelphia, PA
Posts Rated Helpful 0 Times
Computers in general cannot create a "true" random number. Or at least thats what the Nevada State Gaming Commision says.
o_dr zauis is offline   Reply With Quote


Old 10-21-2006, 11:22 AM   #4
o_luminous
 
o_luminous's Avatar
 
Join Date: Jun 2005
Posts Rated Helpful 0 Times
ask Caesium or sidd, they know a load of stuff when it comes to entities it seems
o_luminous is offline   Reply With Quote


Old 10-21-2006, 11:59 AM   #5
o_fjorn
 
Join Date: Feb 2005
Posts Rated Helpful 0 Times
Correct, a computer cannot generate a "true" random number, however

Its random enough for most things, so you really don't need to worry about it


basically, you use your logic_case and set up your command points, and then have it pick a random one on map load

Last edited by o_fjorn; 10-21-2006 at 12:05 PM.
o_fjorn is offline   Reply With Quote


Old 10-21-2006, 01:32 PM   #6
o_loader
 
o_loader's Avatar
 
Join Date: Aug 2005
Location: Portsmouth, England
Posts Rated Helpful 0 Times
It's more random than a number you think of.
o_loader is offline   Reply With Quote


Old 10-21-2006, 03:35 PM   #7
o_imbrifer
 
o_imbrifer's Avatar
 
Join Date: May 2005
Location: Changes every few months
Posts Rated Helpful 0 Times
Thanks, Boojum and everyone - i figured it out and it works beautifully. I'm really excited to unveil this new map once I get the skybox in order..
o_imbrifer is offline   Reply With Quote


Old 10-23-2006, 03:17 AM   #8
Mulchman MM
Retired FF Staff
 
Mulchman MM's Avatar
 
Join Date: Dec 2004
Location: Lacey, WA
Posts Rated Helpful 0 Times
Send a message via ICQ to Mulchman MM Send a message via AIM to Mulchman MM Send a message via MSN to Mulchman MM Send a message via Yahoo to Mulchman MM Send a message via Skype™ to Mulchman MM
I shake my 8-ball up and it's like random->randomInt( 0, infinity ) and always generates 11 because it knows that's my favorite number and that's what I want to see.
__________________
Head of the Orca Revolution (TM)
Mulchman MM is offline   Reply With Quote


Old 10-23-2006, 04:45 AM   #9
o_nezumi
 
o_nezumi's Avatar
 
Join Date: Mar 2005
Location: The Peoples Republic of Harmfull Free Radicals
Posts Rated Helpful 0 Times
If you didn't trust your computer to come up with a random number you could put a lot of invisible triggers in the map that each advance a counter, and then query that counter when you want your number. I guess this wouldn't work if you needed the number right when the map spawns, but it's how I got random numbers in this one TFC map...
o_nezumi is offline   Reply With Quote


Old 10-29-2006, 02:49 AM   #10
o_dark applepolisher
 
Join Date: May 2006
Location: Idaho
Posts Rated Helpful 0 Times
Quote:
Originally Posted by Mulchman MM
I shake my 8-ball up and it's like random->randomInt( 0, infinity ) and always generates 11 because it knows that's my favorite number and that's what I want to see.
When I shake my 8-ball, all I see is the number 8.
o_dark applepolisher is offline   Reply With Quote


Old 10-29-2006, 03:07 AM   #11
o_nodnarb
 
o_nodnarb's Avatar
 
Join Date: Jul 2006
Location: Austin, Texas
Posts Rated Helpful 0 Times
Quote:
Originally Posted by Dark Applepolisher
When I shake my 8-ball, all I see is the number 8.
thats funny, I always get "no"
o_nodnarb is offline   Reply With Quote


Old 10-29-2006, 10:48 AM   #12
o_donny
 
o_donny's Avatar
 
Join Date: Feb 2005
Location: Finland
Posts Rated Helpful 0 Times
You guys have 8 balls?

(Yes, I just had to)
o_donny is offline   Reply With Quote


Old 10-29-2006, 07:49 PM   #13
Circuitous
Useless
Retired FF Staff
 
Join Date: Jun 2005
Class/Position: D Soldier, O Scout
Gametype: AvD
Posts Rated Helpful 9 Times
Send a message via AIM to Circuitous Send a message via MSN to Circuitous Send a message via Yahoo to Circuitous Send a message via Skype™ to Circuitous
Roll a die.
__________________
Look at all those dead links.
Circuitous is offline   Reply With Quote


Reply


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

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

Forum Jump


All times are GMT. The time now is 12:13 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.