Sitting down and getting up

Dazakiwi32
Having another go at using Quest.

I'm trying to do something as simple as to sit in a seat, with first checking if the seat has a flag occupied using IF..then..etc
That all works except that when i choose sit on seat again, it reprints "you sit on the seat." as if its the first time in doing so, its suppose to say the seat is occupied (have gotten round to sitting up a check if player is already in seat for an alternative message).

Also is there a way to remove the hyper/click option Sitdown and replace it with Getup, alternating it so. As you shouldnt be able to sitdown twice on the same object.

Look At object doesn't display anything, its suppose to say whether seat is occupied or empty. I thought maybe because the flags at start arent initialized, but even after sitting onto the seat the rules ive created in look-at are ignored. Im sure im doing something wrong here.

I'm using a flag set when player sits down onto said object. (Im not sure if a flag name has to be unique or you can use say Occupied on any object and it will be set true only for the object it was set to? or whether you need to make the flag name truely unique?)

Use:


Object Setup


I've added Get up as a verb to this object as well, but in the hyper text it only shows Look at, Sit.

I think i have already mentioned it would be handy if sitting on objects declared as seating should already be in the core library, including being able to getup. If the seat is unique in someway then the user can alter the rules governing it. It seems a lot of work just to do something basic as sitting down and being able to get up again. But alas this is often the path to learning how things work.

Also is there a way to copy/duplicate objects? so setting up rules for similar/same objects can save time by easily copying/pasting them as needed?

Thanks

Daza

Pertex
Could you have a look at this: viewtopic.php?f=10&t=2919 ?

guzmere
Soz

Dazakiwi32
I will attach my game (well ive only just started making it so there is only one room and two objects lol) but this seating problem halted me in my tracks.

Seat2 is the prime one im trying to get working in which i will update seat 1 with the same command set once i figure out what i am doing wrong.

What would be nice is to be able to have a custom command set for sit/get up, and in the options tab of any new object have a "Is a type of seat" and tick box that when i want to create a seat object, the command pattern will come into play without me having do anything.
If i have unique types of seating i could create another option to be ticked instead. So in a sense i guess, having the ability to on the fly create and add to the core library.

See attached file.

Pertex
There are several problems? :D
First you don't have a sit-command in your game. The buildin-command does not do anything. Using the chair moves the player inside the chair. Funny thing :D but the player will never come back.
I started to write a small library for sitting down. Perhaps you want to wait a bit to get it

Pertex
Here is a prototype of a sit-library. copy the file to your gamedirectory and add it to your game in the objecttree in the section "Advanced/Included Libraries". When choosing an object you wil find a new tab "Sit/Get Up".

Dazakiwi32
Pertex wrote:Here is a prototype of a sit-library. copy the file to your gamedirectory and add it to your game in the objecttree in the section "Advanced/Included Libraries". When choosing an object you wil find a new tab "Sit/Get Up".


Thanks Pertex. No wonder i was having problems with it, since the default in command doesn't do anything. Hopefully your custom one can be added to the core library?

However just giving it a quick test now, i don't see an option once you do sit down to get up (i just left the options to their defaults) sitdown still appears as one of the options for the object. Is there away to swap "sit down" to "Get up" once the player has sat down on a seat object?

Is it easy to create custom library features like that? or is there some scripting involved?

Thanks

Daza

Pertex
Dazakiwi32 wrote:
Thanks Pertex. No wonder i was having problems with it, since the default in command doesn't do anything. Hopefully your custom one can be added to the core library?

Perhaps Alex can tell us, if he wants to have this in the core. I would prefer to keep it as a library

Dazakiwi32 wrote:
However just giving it a quick test now, i don't see an option once you do sit down to get up (i just left the options to their defaults) sitdown still appears as one of the options for the object. Is there away to swap "sit down" to "Get up" once the player has sat down on a seat object?

Do you mean the menu that appears if you click on the objectlink? Hmm, it's not a standardfeature of Quest, but it should be possible doing this by script. I will have a look at it.

Dazakiwi32 wrote:
Is it easy to create custom library features like that? or is there some scripting involved?

creating a library means scripting :D You can't create libraries in Quest so you have to do it with a texteditor and writing all code manually

sgreig

creating a library means scripting You can't create libraries in Quest so you have to do it with a texteditor and writing all code manually



Just for the sake of argument here, is it not technically possible to write the code for a library in Quest, and the cut/paste it into a separate file from the code editor window when it's done? :D

Pertex
sgreig wrote:
Just for the sake of argument here, is it not technically possible to write the code for a library in Quest, and the cut/paste it into a separate file from the code editor window when it's done? :D


*gnarggnarggnarg* :D Yes you can do this for simple libraries. But if you want to add a gui you have to do it manually

OK, here is a new version of the lib. As Daza suggested it displays only the command in the menu of the objectlink that is possible to do at the moment. So if you sit, it displays 'get up', if you stand, it displays 'sit on' . The problem is that it's not possible to change text that was written to the gamewindow, so I can't change old links.

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

Support

Forums