2 questions from a beginner...

Thierry
Hello ! I'm trying Quest for a few days now, and first I'd like to say "congrats" to Alex because I find it powerful but quite easy to use for a non-expert like me :wink:

However, I have a problem with the "create exit" script : it works well (as the exit appears in the "location" window once the script is runned), but would it be possible to make it appear also in the text window with an hyperlink, like the "classical" exits ? I saw somebody on this forum had kind of the same problem, but I couldn't find the answer.

Also, I was wondering if it was possible to hide the textlines like "> go north", which appears once you've clicked on a "go north" hyperlink. I think it's a bit redundant for the kind of game I want to create, and I'd like to see the new room description immediately after I click on the hyperlink. Is it possible ?

Thank you very much :wink:

Pertex
Thierry wrote:
However, I have a problem with the "create exit" script : it works well (as the exit appears in the "location" window once the script is runned), but would it be possible to make it appear also in the text window with an hyperlink, like the "classical" exits ? I saw somebody on this forum had kind of the same problem, but I couldn't find the answer.

You can't see the created exit in the mainwindow? Even if you call the look command after the script?

Thierry wrote:
Also, I was wondering if it was possible to hide the textlines like "> go north", which appears once you've clicked on a "go north" hyperlink. I think it's a bit redundant for the kind of game I want to create, and I'd like to see the new room description immediately after I click on the hyperlink. Is it possible ?


It i spossible to change the core files to do this. But is it really a good idea? If you scroll up to look what you have done before, you will have problems to see what you have done.

Thierry
Pertex, thank you very much for your answers ! For the first one, it works if I type "look" in the window screen after the script has run. My question was: is it possible to display the created exit without having to do that, in an automatic way ?

Concerning the core files, could you tell me which one(s) I should edit ? I'd like to try, even if it may be a bad idea...

Pertex
No you can't change text which is printed in the main window. But you could call
HandleSingleCommand ( "look" )

in your script after you have created the exit.

Do you want to remove all textlines with">..." or only when using exits? You could have a look at coreparser.aslx and the function HandleCommand. There you will find
    msg ("")
msg ("> " + SafeXML(command))

Thierry
OK, thank you very much :wink: I will take a look this evening and tell you if it works !

Thierry
Pertex, thank you very much for your advices : both of them worked very well, and it really helped me :wink: I'd like to ask you another question about exits : is it possible to remove the full stop in automatic sentences like "you can go north" ? I changed police and colour of my game text, and as the full stop stays in black it looks a bit weird...
I tried by tweaking the "go" command (I removed full stops in // ^go to (?<exit>.*)$|^go (?<exit>.*) // line, but it didn't change anything). Do you have any idea ?

Thank you again for your great help !

Pertex
Really? The full stop stays black? I just tested it but I didn't get this bug.
If you want to remove all full stop, you must look in the language file and in several corefiles. "you can go north" is in Coredescription.aslx

desc = AddDescriptionLine (desc, youarein + " " + GetDisplayName(player.parent) + ".")


Thierry
Wow, you're amazing Pertex :D I had checked several files but couldn't find the right one... I've just modifed the "youcango" description, and that's perfect now. Thank you so much for your help :wink:

Pertex
no problem. I hope you have copied your changed core file into your game directory? Or better just to import the functions to your game.

Thierry
Yes, I kept original core files, but didn't copy the modified ones in my game directory. But I was thinking about a way to integrate these modifications directly into my game, so if copying the core files into the game directory is OK, I think I will do that. I'm not sure to be expert enough to import the functions directly to my game, even if that would be a better solution...

By the way, may I ask you another question :mrgreen: ? How could I implement a "random answer" features, which chooses one answer to display from a list of several answers ? I created a locked door with a code to unlock it, and if the player types the wrong code, I'd like that Quest displays randomly "wrong code", "sorry that's not the right code", "try again", etc.

Pertex
You can importfunctions, templates, commands... by clicking on "Filter" in left bottom corner and choosing "Show Library Elements". Then you will see all core functions printed in grey colour. Choose your function and press "copy".

As you said create a string list with all answers and choose one entry randomly with GetRandomInt(1, ListCount(yourlist)). Here are some infos how to handle lists: http://quest5.net/wiki/Using_Lists

Thierry
OK, I succeeded in importing the two functions I have modified... That's definitively a good news, since I didn't know how to do that. Thanks again Pertex ! For the list, it seems a little bit more complicated, but I'll give it a try :wink:

Currently I have another little problem : is it possible to call a function to re-display the available exits ("you can go etc.") in the main window ? Because in some rooms, I will have a lot of text generated by the multiple uses of some objects, and as a consequence player has to scroll up to see the "you can go..." line again. I've tried to call the "ShowDescriptionRoom" function, but it displays much more than the exits (room description, etc.). I tried "FormatExitList" too, but it didn't seem to work.

Do you have any idea about that ?

Pertex
Are you sure, that "FormatExitList" is not working? :lol:
Try this:

msg (FormatExitList (player.parent.exitslistprefix, ScopeExits(), Template("Or"), "."))

Thierry
Wow, thank you so much Pertex ! I'm so bad with scripts and functions :mrgreen: Thank again for your great help, much appreciated :wink:

Thierry
By the way, I'm really sorry but... I'd like to ask you another question :mrgreen: I've built a room with one object in it, and I want it to have only the "use" function (no "look", "take", etc.). I deleted the other verbs in the "object" menu and of course, it works well : when I click on it, only the verb "use" is displayed next to the hyperlink of my object.
But is there any way to get the "use" function works directly by clicking on the hyperlink of the object ? The sub-menu is quite useless here as my object can just be used, and I think it would be more user-friendly for the player.

Thank you :wink:

Pertex
Hmmm, go to the use/give tab of your object and select the action "use a script" in the "use(on its own)" section

Thierry
Yeah, that's what I did before asking you, but it doesn't change anything. It seems that as long as "use" verb is written in "display verbs" of the object, the sub-menu with "use" appears. And if I delete this verb from "display verbs", I get an error message when I click on the object...
I think the problem is : how to tell Quest to automatically call the "use" function when I click on the hyperlink of my object ? I didn't find the answer yet :(

Pertex
Strange, I don't have problems with it. Could you create and append a test game with one room and one object, showing your problem?

Thierry
Thank you very much Pertex ! I'll upload a test game tonight to show you what happens :wink:

Thierry
OK, so here is a very little game to show you my problem. When you click on the "key" hyperlink, it displays a sub-menu with "use". Then you click on "use" and it will display "you have used the key" (I have selected "use a script" in the use/give menu and added a very simple "print" script).
What I'd like to do is displaying "you have used the key" just by clicking on the "key" hyperlink, without having the sub-menu before :wink:

Thank you by advance !

Pertex
OK, I am getting old. Now I got it. It's not possible to work without the submenu ... at the moment. I think this could be done, exits do have this direct link. But direct links for objects are not very user-friendly, you don't know what will happen with that object. If you find some poison, it could be possible to take it into the inventory or to drink it. So the user does not know, what will happen if he click this link

Thierry
OK Pertex, thank you for the explanations ! I thought that was quite impossible too... Anyway, I have found a way to link each of my object to (at least) two verbs, so that the sub-menu will always be useful :wink: And you're right, objects with just one interaction aren't so user-friendly, so I will change my mind and my game should be more complex and interesting now.

And... by the way... May I ask you another question ? :mrgreen: I'm using the "showpicture" script, but is it possible to tweak it to center the displayed picture ? I've tried an expression like "<align align=\"center\">"picture.jpg"</align>" (that's the one used in the "print centered message" script), but it returns an error message... Why am I so bad with scripts ? :(

Pertex
Centering pictures with show images is not possible yet, but there is an issue for the next version:
http://quest.codeplex.com/workitem/1067

Perhaps you could use the frame picture. This is aways printed centered

Thierry
Yeah, I use "frame picture" for the room picture, but here I wanted to display a little picture inside the text window, which doesn't erase the room picture. But that's OK for the moment, as the picture is displayed where I want to... For centering, I'll wait for the 5.3 version :wink:

Thierry
Another thing which is I think impossible to do, and which could be useful for the next version : the possibility to have different colors (and fonts) for objects hyperlinks and exits hyperlinks. Or is it already possible to do that in Quest 5.2 ?

Pertex
No, thats not possible and I think this will not be done in the next version :D

Thierry
Oh, too bad... I thought that would be more user-friendly for the player. Anyway, I will go on without this feature :wink:

Thierry
Pertex, i think I have a new challenge for you :mrgreen: I wanted to add a displayable menu with several entries when I click on one of my exits. I did it by creating a string list and using the "show a menu" script. It works very well, but I'm a bit disappointed by the way the menu displays itself : a pop-up window which comes in the middle of the game window, hiding most of the text behind.
Is there any way to get a "sub-menu like" display, like when you click on an object hyperlink to choose the verb you want to execute ? I find it much more efficient and sober...

Thank you very much :wink:

Pertex
What can be chosen in your menu? Verbs?

Thierry
Yes, that's a menu with verbs. But in fact, that's just some text lines that I have added with "menulist" variable, and the "show menu" script does all the work after. I mean, it doesn't refer to any traditionnal actions like "use", "take", "open", etc. Hope these precisions will help you :mrgreen:

Pertex
You can try to add displayverbs to your exit, something like

    <exit alias="south" to="room2">
<inherit name="southdirection" />
<displayverbs type="list">Go;Look at</displayverbs>
</exit>

Thierry
Thank you Pertex, I'll try and tell you what happens :wink:

Thierry
OK, here are some news : displaying verbs in a sub-menu is OK thanks to your code ! But unfortunately, it seems impossible to link the displayed verbs to any scripts or actions : it displays an error message. I even tried to copy/paste some code from an object to an exit in my game file, but it still doesn't work. Maybe exits are not designed to support verbs interactions ?
Anyway, it makes me re-think about my interface, and I decided to simplify it, so that I don't need this sub-menu anymore. It is much simpler now, and I think that's a good thing.

But again, thank you very much Pertex for your precious advices :wink:

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

Support

Forums