Question about using object X with object Y in "novella" theme

I have been using the "novella" theme for making a game and things are progressing nicely. Unfortunately I hit a wall again. Namely, how does one use object X with object Y in "novella" theme? I know how to make it work in regular theme when typing in commands like: "use X on Y" or "use X with Y". I even tested it and it works without a glitch. However, I want to skip the commands and use only mouse interface in my game. So how can I use two objects on each other with mouse interface? Any help would be appreciated.


Interesting question. Does this mean you'll be removing the parser then? Because if so that throws up other problems such as how does the character access their inventory to interact with carried objects.


In the editor go to the verb tab in the object you want to edit and then add a verb called 'use with'. on the right hand side panel under 'assignment' there's a drop down menu with three options: Print a message, run a script or requires another object. select the latter and then you can add the object you want it to be used with followed by what happens.

In terms of your inventory you'll probably have to create a command that gives the option to check it that is printed along with the room description (or similar) and use the text processor to turn that into a link.


Thanks for your help. Your solution worked, but not without its hickups. Namely, I would want to use the item only from my inventory. The way it is set up at the moment, the item can be used with other objects even before I pick it up. Is there any way to make it so that "use with" works only when the item is inside your inventory?


If you are hiding the command bar, the best way to control that is via the display verbs on the Object tab. Tick the "Disable..." box, then add/remove command. I think in your case you will need to delete "Use" from the display verbs.


Thanks for your help. Your solution worked, but not without its hickups. Namely, I would want to use the item only from my inventory. The way it is set up at the moment, the item can be used with other objects even before I pick it up. Is there any way to make it so that "use with" works only when the item is inside your inventory?

Hmm, I can't immediately see a solution to that (I'm a bit rusty atm). There's an option to have certain verbs be only displayed if the object is in your inventory but it doesn't appear to work. In fact it's a hindrance as you don't appear to be able to edit it (although I'm unfamiliar with some of the newer Quest features so it's probably me).

You could script checks although that might be a bit of a ball ache to do with every single object. Using object x on object y paste in this script which checks if you're carrying both objects first.

if (not Got(object x)) {
msg ("You need to be carrying it first.")
}
else if (Got(object x)) {
if (not Got(object y)) {
msg ("You aren't carrying object y")
}
else {
msg ("Something magical happens.")
}
}


Pixie, I tried using your method, but it doesn't work. If I tick the "Disable..." box, "use with" doesn't appear in the game. Maybe I am doing something wrong, but I think I got your instructions correctly.

Silver, thanks for the script. The script will be useful for trying to combine two items within my inventory, but not if I want to use an inventory object on a non-inventory object. So I guess, I am still stuck.


Silver, thanks for the script. The script will be useful for trying to combine two items within my inventory, but not if I want to use an inventory object on a non-inventory object. So I guess, I am still stuck.

That script only works on using object x with object y. If you want to use object x with object z then you would need to write a new script for that; it doesn't prevent that.


Eg if object x has to be in your inventory but object y doesn’t you just remove the bit checking if object y is being carried.

if (not Got(object x)) { msg ("You need to be carrying it first.") else { msg ("Something magical happens.") } }

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

Support

Forums