Change "It is locked" message into something else.

AyseSarah
13 Jul 2015, 12:16
This is the first time for me working with quest. I am using the windows pc version.
I have a box which is locked. Naturally, when I try to open the box, it gives me the message: it is locked.
But I want it to print a different message. Is this possible and where do I do this?
Thank you so much!

XanMag
13 Jul 2015, 13:15
1. I added an object and named it 'chest'.
2. Under the features tab for that object, I ticked 'container'.
3. I clicked on the container tab for the chest and next to "container type" I chose limited container. I prefer the limited container for things like this because I think it makes the most sense.
4. I ticked the boxes for 'Can be open' and 'Can be closed' and left the other boxes blank.
5. I put a '3' under the 'maximum number of objects' and left the 'maximum volume of objects' as is (you probably won't need this at all).
6. Under the Locking section for the container, I made sure the 'Locked' box was ticked.
7. Next to the 'Key' box, I selected the key that I wanted to use that would unlock the box. It will show up as long as you have created an object key that you plan on using on the locked chest.
8. There is a section under that saying "If the player tries to unlock/lock, but does not have they key(s), print:"
9. I typed in "This chest is locked. You do not currently own a key that fits the lock." You put whatever you want of course.
10. I also added appropriate messages in the print message boxes next to 'unlock message' and 'lock message'.

Good luck and Happy Gaming!

XanMag

If you want to download it and see it in the editor, it is attached below. Just ignore all the other gibberish in there! =)
The key is in room C.

AyseSarah
13 Jul 2015, 19:14
Hey XanMag,

Thank you very much for your answer! But it is the text I want to change when you give the command: "open object",
not the command "unlock object"
It always says: It is locked.
I don't know if it is even possible to change this text. Thanks a lot though!

XanMag
13 Jul 2015, 19:22
Hey. My fault. But this is an easy fix. Just switch the container 'chest' to openable/closeable. In tiny little print at the top of the script where you see 'script to run when opening object', click on 'make editable copy'. Scroll down to the 'else' statement and change it to whatever you want! Hope that helps!

AyseSarah
13 Jul 2015, 19:28
Yes that solved it! Thank you! :D