Problem with "using" objects
nichie
29 Jun 2003, 17:57I am having a problem with the software. My friend and I are creating a game, and we have an object called "computer." We've set it up that, when used, it's supposed to print a message and start a time. I've checked and double checked that these commands are in the right place, and they are. However, when we go to test the game, any attempts at using the computer yield the message "you don't have that." Everything up to this point works fine. What's the problem?
paul_one
29 Jun 2003, 19:45Oh, that is a normal "use" command.
Ie. You are using an object you have in a certain location (using a key on a locked door, etc...) or on something.
You will need to edit the room commands (the room the computer is in) so that it has the command "use #object# #spare#" and check to make sure that the variable #object# is "computer". The #spare# is there just incase the player types more than just "use computer".
If you want I can make a quick example for you!
Ie. You are using an object you have in a certain location (using a key on a locked door, etc...) or on something.
You will need to edit the room commands (the room the computer is in) so that it has the command "use #object# #spare#" and check to make sure that the variable #object# is "computer". The #spare# is there just incase the player types more than just "use computer".
If you want I can make a quick example for you!
nichie
29 Jun 2003, 20:17Yeah, I ended up figuring this out, and created a room command "use computer." It seems to work now... thanks.
Although, I have another question that I was wondering if someone could answer. I want to make it so that once you use the computer once (which triggers some actions) you can't use it again. I want it to still be in the room, but give a message along the lines of "there isn't anything to do here." Right now I am accomplishing this by making the computer, once used, create an object called "computer used" in the room, and when the computer is accessed I have a conditional set up so that it won't work if the object "computer used" is in the room. This works fine, but looks awkward-- I don't like to have that extra object lying around. Since I am creating it from the script menu, I don't seem to have the option to make it invisible. Is there any other way to do this?
Although, I have another question that I was wondering if someone could answer. I want to make it so that once you use the computer once (which triggers some actions) you can't use it again. I want it to still be in the room, but give a message along the lines of "there isn't anything to do here." Right now I am accomplishing this by making the computer, once used, create an object called "computer used" in the room, and when the computer is accessed I have a conditional set up so that it won't work if the object "computer used" is in the room. This works fine, but looks awkward-- I don't like to have that extra object lying around. Since I am creating it from the script menu, I don't seem to have the option to make it invisible. Is there any other way to do this?
Alex
29 Jun 2003, 21:50I'm not sure why "use computer" wasn't working before - if you send me your ASL file I can take a look into it for you. Just email it to me at alex@axeuk.com.
The script commands in the Objects category "Make an object inaccessible" or "Hide an object" will do what you want with your "computer used" object. Perhaps an easier way might be to set a numeric variable to 1 when you have used the computer. Quest 3.5 will introduce an even easier way to do this, as you will be able to set a "flag" to indicate things that have happened in your game. I will be releasing a beta version of Quest 3.5 soon, but until then using a numeric variable might be a more elegant solution than using another object - but it's up to you, as always in Quest there is more than one way of doing things.
The script commands in the Objects category "Make an object inaccessible" or "Hide an object" will do what you want with your "computer used" object. Perhaps an easier way might be to set a numeric variable to 1 when you have used the computer. Quest 3.5 will introduce an even easier way to do this, as you will be able to set a "flag" to indicate things that have happened in your game. I will be releasing a beta version of Quest 3.5 soon, but until then using a numeric variable might be a more elegant solution than using another object - but it's up to you, as always in Quest there is more than one way of doing things.
Anonymous
30 Jun 2003, 14:37could it be the easy thing - you can't use the computer because the player can't use anything until he has taken it, and the computer never gets taken before the player uses it? If so, making the command 'use computer' is probably the best thing to do, so no prob there.
You can simulate a flag using a numeric variable or collectable (setting it to 0 initially, then to 1 when they've used the computer), but really, having the computer create another object is a pretty good solution, and about the simplest way you'll find of doing it.
ALTHOUGH - you could also make the 'computer' description a string variable, put the working computer description in it first up, then change it to the not working computer description when it is used.
You can simulate a flag using a numeric variable or collectable (setting it to 0 initially, then to 1 when they've used the computer), but really, having the computer create another object is a pretty good solution, and about the simplest way you'll find of doing it.
ALTHOUGH - you could also make the 'computer' description a string variable, put the working computer description in it first up, then change it to the not working computer description when it is used.
Alex
30 Jun 2003, 17:13Ah yes, a string variable is another way you could do it.
Yet another way would be to change the "look" property of the object.
I think that's enough ways for now
Yet another way would be to change the "look" property of the object.
I think that's enough ways for now