different messages on the same line.

Anonymous
Is there any way to get quest to print different messages on the same line. What I am talking about is something like this:

if ( %animal% = 1 ) then msg <The cat has >
if ( %animal% = 2 ) then msg <The dog has >
if ( %fur% = 1 ) then msg <short black fur.>
if ( %fur% = 1 ) then msg <long brown fur.>

I want it to print:

The cat has short black fur.

not:

The cat has
short black fur.

I hope this makes sense.

Farvardin
if your script can fit on the same line, then the result can do it too. But your code is asking for the msg command twice (considering you want animal to be of specie 1 or 2, and the same goes for the fur)
What you're asking is the second message "eat" the previous line feed, or go on the previous line, but I don't think there is such an escape command (formed with | )

I suggest you you try something like (<!> BEWARE NOT TESTED) :

 
define variable <animalresult>
type string
end define

define variable <furresult>
type string
end define

if ( %animal% = 1 ) then %animalresult% = cat
if ( %animal% = 2 ) then %animalresult% = dog
if ( %fur% = 1 ) then %furresult% = short black fur
if ( %fur% = 1 ) then %animalresult% = long brown fur

msg <The %animalresult% has %furresult%>


I'm not sure it's correct to assign a string variable like this :
%animalresult% = cat

but you get the idea....

Alex
The correct way to assign something to a string variable would be e.g.:


set string <animalresult; cat>


BUT in this case, for printing onto the same line, all you need to do is use the |xn formatting code:


if ( %animal% = 1 ) then msg <The cat has |xn>
if ( %animal% = 2 ) then msg <The dog has |xn>
if ( %fur% = 1 ) then msg <short black fur.>
if ( %fur% = 1 ) then msg <long brown fur.>

Farvardin

|xn (at end of msg text only) no new line



I can see that in the Quest manual, yes... :oops: :oops: :oops: :oops: :oops: :oops: :oops: :oops:

GameBoy
as i always say, and never do myself....

READ THE DOCUMENTATION 8)

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

Support

Forums