Action RPG Framework

by Forum_account
Action RPG Framework
A framework for developing action RPGs.
ID:815021
 
Resolved
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:

mob.prompt("This is a message box you press the space bar to close, even though there are no buttons on it.", null, 8, 3)
Applies to:
Status: Resolved (7)

This issue has been resolved.
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.
You can use the mob's prompt() proc:

mob.prompt("Here's some text.", "Yes", "No")

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.
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?
Both are interesting, but I think I'm going for the first option.
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:

var/message = "This is a message box you press the space bar to close, even though there are no buttons on it."
mob.prompt(message, null, 8, 3)