{once:}

OurJud
11 Dec 2015, 11:55
Would someone please explain what I'm doing wrong.

I want to use {once:} instead of 'firsttime, otherwise' for room descriptions.

This is how I have it as a test, but it just ignores the once and shows both sentences.

{once: This is the first description}
And this is the second description.

The Pixie
11 Dec 2015, 12:51
As written: The first line appears only the first time. The second line will appear every time. As far as I know, there is no equivalent to the otherwise bit.

OurJud
11 Dec 2015, 13:05
I see. I've misunderstood its function then.

So If I want two different descriptions for the same location, I have to use the firsttime, otherwise script?

The Pixie
11 Dec 2015, 13:42
Yes.

But it might be worth putting in a feature request for a notfirst feature in the text processor. I would guess it would not be difficult to do.

OurJud
11 Dec 2015, 14:38
The Pixie wrote:Yes.

But it might be worth putting in a feature request for a notfirst feature in the text processor. I would guess it would not be difficult to do.

Wouldn't they just reject it on the grounds the function already exits with firsttime, otherwise?

Marzipan
11 Dec 2015, 15:33
The Pixie wrote:Yes.

But it might be worth putting in a feature request for a notfirst feature in the text processor. I would guess it would not be difficult to do.


I'd be all for this. I use the text processor whenever I can, and probably more often than scripts.

OurJud
11 Dec 2015, 15:39
Marzipan wrote:

"The Pixie"

Yes.

But it might be worth putting in a feature request for a notfirst feature in the text processor. I would guess it would not be difficult to do.



I'd be all for this. I use the text processor whenever I can, and probably more often than scripts.


Would you like to add it then? You obviously understand better what TP means, so you'd be able to word it properly and point out why it differs from firsttime. otherwise.

Just so long as it can used with 'add a script' rather than 'text', as I need scripts for other functions within a room.

Marzipan
12 Dec 2015, 00:01
OurJud wrote:
Would you like to add it then? You obviously understand better what TP means, so you'd be able to word it properly and point out why it differs from firsttime. otherwise.

Just so long as it can used with 'add a script' rather than 'text', as I need scripts for other functions within a room.


I've never put in a feature request, so I'm not even sure where they're supposed to go, besides the feedback board.

I don't think it would need to differ that much. {once} is not really any different than 'Before entering the room for the first time', after all. The point is that it's a shortcut for something commonly used, and in my case saves a whole lot of tedious clicking.

OurJud
12 Dec 2015, 00:17
Marzipan wrote:
I don't think it would need to differ that much. {once} is not really any different than 'Before entering the room for the first time', after all.

I've never played around with the room scripts tab much, but this one puzzles me. How can you set a room to do something before entering? I can't even get my head around the logic of the wording; 'Before entering the room for the first time' - what does that even mean??

I just want to have two different descriptions for a room, and the easiest way would be to have {tags} which say something along the lines:

{first: This is the description for the room on entering for the first time.}
{other: And this is the description for subsequent visits.}

Far less of a pain than scripting the firsttime, otherwise.

Marzipan
12 Dec 2015, 00:35
Before as in before the room is displayed and any other scripts fire. So probably even before the player is physically moved there after you type the command.

OurJud
12 Dec 2015, 00:39
Marzipan wrote:Before as in before the room is displayed and any other scripts fire. So probably even before the player is physically moved there after you type the command.

Sorry, I'm either very tired, very stupid, or quite possibly both.

Can you give an example of how and why you would set a script on 'before entering the room for the first time' cos I'm still not getting it. What exactly would you want a room to 'do' before a player enters it? And how would that even manifest itself?

Marzipan
12 Dec 2015, 03:27
Well you could use it in the same as {once} if the text processor wasn't available. Any other script you only want to fire the first time the player enters a room too, of course, but that's the reason I originally brought it up. My point was that {once} already had an equivalent script, and that hadn't stopped it from being added. So a TP shortcut to 'firsttime, otherwise' should be just as possible and useful.

Anonynn
12 Dec 2015, 04:17
It confused me when I first started using Quest --- but here's how I understand it.

((No scripts))
Room Description

Blah blah sunny and warm ...

Before Entering Script
msg ("As you approach the sunny and warm room you hear the howl of wolves and marshmellows! Gah!")
Room Description
Blah blah sunny and warm...

After Leaving Script
Room Description
Blah blah sunny and warm...
("After leaving the room you hear wolves snacking on marshmellows! The horror!")

So you could do a "Before Entering Script" with a "Firsttime" script.


Hope this helps!

___________________________

As for the {once:} script...

Let's say you use it on a "look" description on an item.

This cheeseburger smells like doody! {once:It makes your stomach wretch!}

The player sees...

This cheeseburger smells like doody! It makes your stomach wretch!

But if they look at the cheeseburger item again...

This cheeseburger smells like doody!

------------------
Or instead of "flavor text" you can use it like this...

You walk into the dark forest {once:and hear the frightening howl of a wolf in the distance..}.

player sees.....

You walk into the dark forest and hear the frightening howl of a wolf in the distance...

player leaves and returns...

You walk into the dark forest.




And I have no idea what my wolf obsession is tonight... >_>

OurJud
12 Dec 2015, 09:49
That makes sense to a certain extent, but it's the 'before' I don't get. From what I can understand from this thread, it would make more sense to say 'On entering for the first time'.

The Pixie
12 Dec 2015, 10:17

Alex
14 Dec 2015, 14:21
Great, now who wants to implement it? It's entirely Quest ASLX code in the core libraries.

OurJud
14 Dec 2015, 15:06
Alex wrote:Great, now who wants to implement it? It's entirely Quest ASLX code in the core libraries.

Easy peasy! I could do that using my nose.

... I'll get me coat.

The Pixie
14 Dec 2015, 15:23
I'll have a go. The tricky bit is using GitHub.