unsightedmetal6

Villager
Member
Joined
May 31, 2016
Messages
9
Reaction score
0
First Language
English
Primarily Uses
Hello. I have another question.


I am making this game where you are in a "battle arena" and there is a guy you talk to, and he randomly selects a number, which selects a person, whose variable is also random.


E.g. You walk up to this guy. He then picks the number "2". (variable "A")


Then every NPC picks a random number. In this case it is "2"(variable "B", "C", "D", "E", etc.)


Another NPC also ends up picking "2".


I would go with this, but how can I prevent 2 people from choosing the same number while keeping it random?


Thanks!
 

bgillisp

Global Moderators
Global Mod
Joined
Jul 2, 2014
Messages
13,789
Reaction score
14,589
First Language
English
Primarily Uses
RMVXA
I don't think I understand what you wish to do here. What are you ultimately trying to accomplish here? Right now it seems like an odd number guessing game based on the description you gave, and based on that all I can suggest is you do a variable check to see if the variables are equal, and if so, pick another random number.


If that doesn't do what you want, please provide a more detailed description of what  you wish to accomplish. That way we can help you. Though...side note...whatever we set up will no longer be truly random, so you might need to remove the words in bold. That is because the minute you block a repeat number, the sequence generated violates the definition of a sequence of random numbers.
 

GreyStone84

Sic Gorgiamus Allos Subjectatus Nunc
Veteran
Joined
Jun 24, 2015
Messages
295
Reaction score
96
First Language
English
Primarily Uses
RMVXA
Ya, your description is kind of vague, you need to be a little more detailed in what you are asking. I understand you want something to be picked at random.


Your "Arena Guy": does he pick a random number? And the number is a random person?


Then you walk up to the Random Person and they too pick a random number?


Then "Every" NPC picks a number? How many NPC's are there? Why are they picking numbers? Why are they all picking the number "2" in your example?


Another NPC also end up picking 2 - why? Are they part of "Every" NPC?


What are the variables for?


I kinda went overboard on the questions above, but letting us know what you are trying to do in detail can let us help you figure out exactly what the issue is and how to best help your situation.
 

unsightedmetal6

Villager
Member
Joined
May 31, 2016
Messages
9
Reaction score
0
First Language
English
Primarily Uses
Ya, your description is kind of vague, you need to be a little more detailed in what you are asking. I understand you want something to be picked at random.


Your "Arena Guy": does he pick a random number? And the number is a random person?


Then you walk up to the Random Person and they too pick a random number?


Then "Every" NPC picks a number? How many NPC's are there? Why are they picking numbers? Why are they all picking the number "2" in your example?


Another NPC also end up picking 2 - why? Are they part of "Every" NPC?


What are the variables for?


I kinda went overboard on the questions above, but letting us know what you are trying to do in detail can let us help you figure out exactly what the issue is and how to best help your situation.

It's fine. bgillisp answered my question.
 

unsightedmetal6

Villager
Member
Joined
May 31, 2016
Messages
9
Reaction score
0
First Language
English
Primarily Uses
I don't think I understand what you wish to do here. What are you ultimately trying to accomplish here? Right now it seems like an odd number guessing game based on the description you gave, and based on that all I can suggest is you do a variable check to see if the variables are equal, and if so, pick another random number.


If that doesn't do what you want, please provide a more detailed description of what  you wish to accomplish. That way we can help you. Though...side note...whatever we set up will no longer be truly random, so you might need to remove the words in bold. That is because the minute you block a repeat number, the sequence generated violates the definition of a sequence of random numbers.

Basically I wanted a game where you battle a random NPC, but that's not important as your reply answered my question.


Thanks!
 

Latest Threads

Latest Posts

Latest Profile Posts

If there was an award for best game dev procrastination, I'd say 'meh, I'll pick it up tomorrow' >_>
Honestly though, I've been staring at the same half-made map for a while now haha! Ahhh, I'm so tired of mapping!
Time to add the support for import/export default RMXP maps. Maybe there will be customized tileset support later. In theory, I can reimplement the entire RMXP inside this RMXP-made game to make more RMXP games. :kaojoy:RMXPFORMATSUPPORT.jpg
Gonna make a story driven game someday in RPG Maker about this diseased character in my head. Will keep you posted, although I was warned by the authorities that posting too much would be considered 'spamming' so I WON'T SPAM. It'll be before I go in anyways. It's gonna be messed up but it won't be explicitly pornographic so don't worry, I'll give all the content warnings. :barf::barf::barf:
If you're a RM plugin developer, and you're reading this...

Thank you. You're awesome. Even if I haven't used your plugin, your work is appreciated.

Forum statistics

Threads
111,265
Messages
1,059,724
Members
144,556
Latest member
Vanderblood
Top