Freedom Reborn

Freedom Force Forums => Scripting Forum => Topic started by: BentonGrey on August 31, 2009, 09:15:48 PM

Title: Mutliple Characters, Multiple Headaches
Post by: BentonGrey on August 31, 2009, 09:15:48 PM
So, a while back I asked M25 if there was any way to offer alternative dialog for whichever characters a player chooses to bring into a mission.  He offered me the following:

QuoteHero says, if Hero is superman, "You'll have your city back by morning folks. You can count on us!'"
if Hero is wonder_woman, "Take heart! You are no longer defensless!"
"You'll have your city back by morning folks...I swear it."

This works perfectly, with the game picking between the three lines, depending on who "Hero" is.  However, "Hero" is always the first character.  You can imagine the trouble this causes.  Essentially, you can only have one character speak.  How can I get around this?
Title: Re: Mutliple Characters, Multiple Headaches
Post by: yell0w_lantern on September 01, 2009, 01:30:22 AM
You mean pick between Hero1, Hero2, Hero3 and Hero4?
No idea.
Can you specify "Hero2 says, if Hero2 is superman"? It seems logical but it would increase the writing almost exponentially.
Title: Re: Mutliple Characters, Multiple Headaches
Post by: BentonGrey on September 01, 2009, 02:36:19 AM
Quote from: yell0w_lantern on September 01, 2009, 01:30:22 AM
You mean pick between Hero1, Hero2, Hero3 and Hero4?
No idea.
Can you specify "Hero2 says, if Hero2 is superman"? It seems logical but it would increase the writing almost exponentially.

Precisely the problem.  I wish M25 was around.
Title: Re: Mutliple Characters, Multiple Headaches
Post by: bearded on September 01, 2009, 06:45:57 AM
SpeakReaction('hero_'+ str(randint(1, 4)), reaction='SELECT', variation='01' )
what about this?
except you could, instead of randomizing, you could go seqential or do a len check for how many heroes there are and make it be the last one.  i can't remember the python for how to see how many heroes there are, but i could find it if you want.
this also has to have the def from the topic 'hero 1 speech', but it could be modified for what you need, i'm sure.
it's possible i'm totally misunderstanding what you are asking.
Title: Re: Mutliple Characters, Multiple Headaches
Post by: Previsionary on September 01, 2009, 07:05:14 AM
he's using ezscript, bearded. Code doesn't really help him.
Title: Re: Mutliple Characters, Multiple Headaches
Post by: BentonGrey on September 02, 2009, 02:19:18 AM
'Fraid so, but thanks Bearded.  Maybe I can figure out a way to use that.  I am thinking that I'm just going to call Hero2, 3, and 4, and alternate them.  That way, there is at least SOME chance of a character being in that spot.