Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.18 / 5.00 3,534 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.80 / 5.00 4,200 ViewsI'm trying to make a random character generator that I'll eventually develop into a bigger game. I've got it randomly generating the gender, name, likes, dislikes, blah blah blah. I've written out the personality traits and have made it so it can't repeat traits, but I need a way to make it so that if it picks a certain trait (e.g. "Friendly") it cannot pick other, conflicting traits (e.g. "Unfriendly"). I haven't searched much about this problem because really, I have no idea what to search. Does anyone have any suggestions as to how to go about this? Thanks.
Intellectually Questionable? You decide.
At 3/24/12 12:42 PM, Lynkusu wrote: I'm trying to make a random character generator that I'll eventually develop into a bigger game. I've got it randomly generating the gender, name, likes, dislikes, blah blah blah. I've written out the personality traits and have made it so it can't repeat traits, but I need a way to make it so that if it picks a certain trait (e.g. "Friendly") it cannot pick other, conflicting traits (e.g. "Unfriendly"). I haven't searched much about this problem because really, I have no idea what to search. Does anyone have any suggestions as to how to go about this? Thanks.
i would go about doing it like this, unless theres a shit ton of traits to pick from, then you could figure something out similar.
if (trait == unfriendly){
canPickFriendly = false
}
P.S. that's probably not your actual variable names so switch it about if thats even what your looking for.
At 3/24/12 12:47 PM, caseymacneil wrote: i would go about doing it like this, unless theres a shit ton of traits to pick from, then you could figure something out similar.
if (trait == unfriendly){
canPickFriendly = false
}
P.S. that's probably not your actual variable names so switch it about if thats even what your looking for.
Hmm, yeah, there is a shit ton of them. xP I was hoping there'd be a less tedious way, but if this works, I'll make myself do it. Thanks. xD
Intellectually Questionable? You decide.
Use groups for the traits and pick only one trait from the group. Set conflicting traits in the same group. You can have several groups, more than you the amount of traits you pick. Like you can have 9 groups, but only pick one trait from 3 groups. This will take some organizing from you, but definitely better idea than what the previous guy suggested with the booleans.
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
At 3/24/12 01:43 PM, ProfessorFlash wrote: Use groups for the traits and pick only one trait from the group. Set conflicting traits in the same group. You can have several groups, more than you the amount of traits you pick. Like you can have 9 groups, but only pick one trait from 3 groups. This will take some organizing from you, but definitely better idea than what the previous guy suggested with the booleans.
Oh damn, that's a really good idea. I'll just make an array for each group. Thanks! :)
Intellectually Questionable? You decide.