Different response when action is re typed.

Is there a way to print a different response when the player re enters a command.

So it might be 'talk to man', and then the man says something

And then the players types again 'talk to man' and the man says something different.

I'm using the web version btw


Do you just want a different statement the first time?
There's a script command firsttime that does different things the first time and on subsequent times the script is run.

Or if you want more control, you could give the man an attribute to count the number of times he's been talked to. Increase the attribute each time, and then use an if statement to do different things based on the number of times.

Or if you want him to say different things and don't care about what order, you could use the function PickOneString to select one at random:

msg (PickOneString (Split ("Nice weather we're having.;Long time no see.;Did you see the game last night?")))

Or the same thing within a line of text, using the text processor:

Bob smiles and says “{random:I like trains:Nobody understands me:I'm bored}.”

There's lots of ways to do it… hopefully one of these will be what you're looking for.


Make a a command script (in location of your character)called : "talk to man"
Add a "First time script " for a one off reply from the man.
In this same script add a flag script : set flag object "man" flag name"manreply1"

Then add new script : If object "man" has flag "manreply1"
Then add a script text response of your choosing for what will be man's second response to same question "talk to man".
Again, In this same script add a flag script : set flag object "man" flag name"manreply2"

So you can easily repeat and add more "manreply" with a number at the end and have several replies to your same "talk to man". You can also add (If player holds object) or any other type of condition script to your scenarios and control the progression of the conversation as you see fit.

Hope that helps! I have learned how to have hundreds of conversation replies with 10 characters in my game via trial and error.


You two are absolute heroes thank you so much. You really can do anything with this software.


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums