Hello, Forum_account
I was wondering if you could implent an easy-to-use way of generating and displaying on-screen text. This would be useful for dialogues, etc.
Sincerely,
Raimo.
ID:815021
Jun 14 2012, 3:39 am
|
|||||||
Resolved
| |||||||
I'm going to check the prompt() proc out. I will be back with an edit in five minutes.
Edit: I checked it out and it wasn't really what I was looking for. I don't want to put you through a lot of hassle, but I was actually looking for like, on-screen text only. No sorts of alert boxes, etc. |
I can make a similar thing that doesn't contain buttons, if that's what you're looking for. Would you want it to work like prompt() where it locks their input until they make a choice? Or do you want to be able to display on-screen text and not have it interfere with the player's actions?
|
Ok, this'll be in the next version. If you call prompt() and don't give it any button names it adds an "Ok" button by default. If you specify null as the button name it won't show any buttons at all:
mob.prompt("This is a message box with no buttons on it.", null)
|
Forum_account resolved issue with message:
If you pass null to the prompt proc as a button name it won't show any buttons. You can also pass numbers to the prompt proc to specify its size (in tiles, the default is 6x4). For example: |
It's like an on-screen alert box. The first parameter is the text that's displayed, the remaining parameters are the choices the player can make. The prompt() proc returns the text of the button the player selected.