Author Topic: Larry 3 customized swearing - How to do it?  (Read 5924 times)

0 Members and 1 Guest are viewing this topic.

Pikachu14

  • Guest
Larry 3 customized swearing - How to do it?
« on: July 24, 2002, 07:56:19 AM »
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...



Offline Chris Cromer

Re:Larry 3 customized swearing - How to do it?
« Reply #1 on: July 24, 2002, 08:33:50 AM »
You save the "word" as a variable and use FormatPrint to print it.

For instance I beleive it was something like this:

Code: [Select]
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.
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Pikachu14

  • Guest
Re:Larry 3 customized swearing - How to do it?
« Reply #2 on: July 24, 2002, 08:38:22 AM »
Well, that's showing the cussword. But how does EditPrint fit in?

Offline Chris Cromer

Re:Larry 3 customized swearing - How to do it?
« Reply #3 on: July 24, 2002, 08:49:35 AM »
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.
« Last Edit: July 24, 2002, 08:50:06 AM by Chris Cromer »
Chris Cromer

It's all fun and games until someone get's hurt then it's just fun. ;)

Offline Brian Provinciano

Re:Larry 3 customized swearing - How to do it?
« Reply #4 on: July 24, 2002, 02:33:13 PM »
You simply use a combination of EditPrint() and FormatPrint().


You can use string variables:

Code: [Select]

/******************************************************************************/
(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:

Code: [Select]

/******************************************************************************/
(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:
Code: [Select]

/******************************************************************************/
(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

  • Guest
Re:Larry 3 customized swearing - How to do it?
« Reply #5 on: July 24, 2002, 03:04:59 PM »
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...


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.025 seconds with 17 queries.