Money for cuddles
dranjuab87
31 Aug 2018, 11:45Hi, I have an object that can be cuddled, and the flavour text stipulates that money is increased as a result. I have created a 'turn script' with the object as the parent directory. I can create an if/then statement, but I'm unsure what to put after 'if'. I have found the 'then' statement no problem. I am hoping for: if/when object is cuddle, increase money by x. TIA
mrangel
31 Aug 2018, 11:53A turnscript is run every turn while the player is inside the object. This probably isn't what you want in this case.
I'm assuming you have created "cuddle" as a verb on the object?
You need to make that verb a script. Have it increase the player's money, and then display a message saying that the money has increased.
dranjuab87
31 Aug 2018, 11:59Thanks. Yeah I've made that verb in the GUI.
How do I make it a script? Is that in the GUI or the code view?
mrangel
31 Aug 2018, 13:10I've not used the desktop version.
But in the online version, next to the name of every verb there's a dropdown to choose "string" (the verb displays a message and does nothing else) or "script" (the verb actually does something).
J_J
01 Sept 2018, 01:42Is there a reason you are using a turn script?
If you are using cuddle as a verb, you could also just increase money after the action is done?
Click on the object in the desktop. Click on verb in the tab on that object. Add "cuddle" (you probably want it to look something like this: cuddle; hug; snuggle; ) then, in the box that shows up at the bottom of this screen select "run a script." Then add msg.
After the msg, put in "increase money" and the amount you want it to increase it by.