Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Pop up box


Lithumist
 Share

Recommended Posts

Hi, i was wondering how to make a pop up box that could come up, just a normal windows one.

Its kinda like the player prompts, but with just text.

also, is it possible to make it accessed by scripting:

MsgBoxShow(index,"Hello!")

I dont know if there already is one built into the engine, if there is, im sorry :embarrassed:
Link to comment
Share on other sites

This is what i mean:

i would like to know how to make a sadscript command that looked abit like this:
MsgBoxShow(index,"Hello!")
the command would show a pop up box, like the box that comes up when you step on a house tile, but it would only have text.
I could use it for npc speech.

I hope you understand now :cheesy:

EDIT:
@Umbra!:

> Umm. I'm pretty sure there's already a function in Sadscript for this.
>
> QueryBox?

I think that query box is like player prompt, doesn't query, mean question?
Link to comment
Share on other sites

This is the MsgBox command.

The syntax is:

MsgBox "(message here)", 0, "(title of the message box)"

Note that there are no parenthesis in this syntax, unlike most other functions.

The QueryBox command is very similar to this, except it asks the player to type in something, so you wouldn't use that.
Link to comment
Share on other sites

Why not call a custom menu?
You can make it like this
```
case X
Call CustomMenuShow(Index, "Npc 1", "\GUI\CUSTOM\Background.bmp", 1)
Call CustomMenuPicture(Index, 0, "\GUI\CUSTOM\randompicturefilewhichisjustextonacertaincolourbackround.bmp", 3, 32)

```And if those are clicked you can just call an Onclick ;D
Link to comment
Share on other sites

@Kimimaru:

> Note that there are no parenthesis in this syntax, unlike most other functions.

Not necessarily; I've gotten it to work by using parenthesis in the past, though I suppose they are not needed.
E.g. my [Rick Roll Script](http://www.touchofdeathforums.com/smf/index.php/topic,47649.0.html), which is actually the first script that I've seen use the msgbox.
Link to comment
Share on other sites

Oh, okay. Thanks for telling me about that. I've tried it with parenthesis before, but it didn't work. I must've wrote it like this:

```
MsgBox ("text", 0, "title")
```
The way you have it, there's no space in between the word **MsgBox** and the parenthesis. I still prefer to use it without parenthesis, but either way works fine, I suppose.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...