different messages on the same line.
Anonymous
04 Feb 2004, 19:43Is 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.
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
04 Feb 2004, 20:18if 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) :
I'm not sure it's correct to assign a string variable like this :
%animalresult% = cat
but you get the idea....
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....
The correct way to assign something to a string variable would be e.g.:
BUT in this case, for printing onto the same line, all you need to do is use the |xn formatting code:
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
04 Feb 2004, 21:55|xn (at end of msg text only) no new line
I can see that in the Quest manual, yes...
GameBoy
06 Feb 2004, 22:38as i always say, and never do myself....
READ THE DOCUMENTATION 8)
READ THE DOCUMENTATION 8)