Larry 3 customized swearing - How to do it?

Pikachu14 In Larry 3, you could enter your own custom cussword and whenever appropiate, Larry would say it. But how is it done? EditPrint, obviously, but...
AGI1122 You save the "word" as a variable and use FormatPrint to print it.

For instance I beleive it was something like this:

FormatPrint("Don't you dare say %s to me again!" aString)

It will then replace %s with the word that is in aString.

Hope this helps.
Pikachu14 Well, that's showing the cussword. But how does EditPrint fit in?
AGI1122 EditPrint is for entering a value into a edit field(just like the input for typeing.) When it is called it opens a dialog window with the text you chose, the input box, and any text you want to be within the input box.
Brian_Provinciano You simply use a combination of EditPrint() and FormatPrint().


You can use string variables:


/******************************************************************************/
(string
theName[41]
)
/******************************************************************************/
(instance public rm001 of Rm
(properties)
(method (init)
EditPrint(theName 40 "What is your name?")
FormatPrint("Well hello there %s! Have a good day!" theName)


or local variables:


/******************************************************************************/
(local
theName[41]
)
/******************************************************************************/
(instance public rm001 of Rm
(properties)
(method (init)
EditPrint(@theName 40 "What is your name?")
FormatPrint("Well hello there %s! Have a good day!" @theName)

or temp variables:

/******************************************************************************/
(instance public rm001 of Rm
(properties)
(method (init)
(var theName[41])
= theName[0] 0
EditPrint(@theName 40 "What is your name?")
FormatPrint("Well hello there %s! Have a good day!" @theName)


Each operate slightly differently, but all work.
Pikachu14 YAY! It works! Thank you!

Enter new cuss word: Camelpoo
c -What are you going to do?- uss
"Camelpoo!" you shout, and feel much better...