requires AGS 2.71 or above
It's a real pain to script multiple responses to an action, sometimes. You have to go around declaring variables, put in bunches of if statements, etc. Not too much effort for one interaction, but if you're doing it for all of them?
SSH to the rescue with MultiResponse...
add a script action to your "interact with hotspot" for example and say:
Code: ags
And the first click on it will give you "No, I'm not touching that", the 2nd "No, I'm really not going near it" and the 3rd and subsequent clicks "Look, for the last time, NO!"
Great, I hear you say, but there's more!
The function returns which of the responses was given, so you can do something special:
Code: ags
Full documentation at http://ssh.me.uk/moddoc/MultiResponse
Download MultiResponse module here
UPDATED FOR v1.1:
Multi.Respond still does what it used to, but Multi.Disp is now preferred (I would have made it Display, but AGS won't allow it
) There is now also Multi.Say to use player.Say instead of Display, and Multi.SRespond which returns the string as GarageGothic suggested. Also new Multi.SLoop and Multi.SRandom which return a looping or random string respectively. There is also the current position in Multi.reponse and a "last response" detector in Multi.last.
UPDATED v1.2:
Added some v3.0+ support with extender functions
It's a real pain to script multiple responses to an action, sometimes. You have to go around declaring variables, put in bunches of if statements, etc. Not too much effort for one interaction, but if you're doing it for all of them?
SSH to the rescue with MultiResponse...
add a script action to your "interact with hotspot" for example and say:
Multi.Disp("No, I'm not touching that>No, I'm really not going near it>Look, for the last time, NO!");
And the first click on it will give you "No, I'm not touching that", the 2nd "No, I'm really not going near it" and the 3rd and subsequent clicks "Look, for the last time, NO!"
Great, I hear you say, but there's more!
The function returns which of the responses was given, so you can do something special:
int state=Multi.Say("I don't think I want to take any>I'd rather not>OK, if you insist>I've already got some");
if (state==3) player.AddInventory(iIckyGoo);
Full documentation at http://ssh.me.uk/moddoc/MultiResponse
Download MultiResponse module here
UPDATED FOR v1.1:
Multi.Respond still does what it used to, but Multi.Disp is now preferred (I would have made it Display, but AGS won't allow it

UPDATED v1.2:
Added some v3.0+ support with extender functions