How do I move the player from a room to the same room?

coldReactive
26 Apr 2018, 00:28

So that the room text is displayed again?


Raist
26 Apr 2018, 01:12

Just call the function
ShowRoomDescription

It will show the room text again. You could set it up as a command or after the player performs a certain action (for example, if an attack kills a mob, ShowRoomDescription at the end of combat to remove/display any objects that changed because of the combat).


coldReactive
26 Apr 2018, 01:21

Well, that's nice to know. But now I have the same problem here, it lists the location name and the object list: http://textadventures.co.uk/forum/quest/topic/ytpa2q_jlkcokrzujq_bbq/how-to-hide-the-object-list-and-area-name-from-the-room

There's also no breaks, so the text is all smashed together with one line right above/below another. Is there any way to add breaks between the show description and the prior text?


DarkLizerd
26 Apr 2018, 02:12

I think msg() will print a blank line.
Also, in the Room Description tab is a check box for:
[ ] Put an extra newline before each turn
This should do it.


hegemonkhan
26 Apr 2018, 03:07
msg ("hi")
msg ("")
msg ("bye")

// output:

hi

bye

// ------------------

// or use two 'br' (only one 'br' will just put the following text on the next line):

// (I don't know the proper syntax on/for using html, like the '<br/>', in strings)

msg ("hi<br/><br/>bye")

// output:

hi

bye

// -------------------------

// (since I don't know the proper syntax) you may need the 'cdata' tags encasing it... (not sure - not used html yet in strings):

<![CDATA[

  msg ("hi<br/><br/>bye")

]]>

// or (I don't know the proper syntax):

msg ("<![CDATA[hi<br/><br/>bye]]>")

// output:

hi

bye

mrangel
26 Apr 2018, 04:54

(In case anyone cares: if you want to simulate moving moving the player from one room to the same room, so it runs the room's enter scripts again as well as showing the description, you can use do (player, "changedparent"))