[SOLVED!] How do I get a function to accept multiple options?

I’m trying to create a function out of some of my events to try and streamline the process. I’m working on a dialogue function similar to Pandako’s dialogue box extension.

I created my events and then converted them to a function and I’m trying to compare mine to pandako’s for inspiration but I think they used javascript so I can’t really make sense of it.

Here’s what I have:

and in the event sheet it looks like this:

But when I push the key to bring up the dialogue box and text, it shows what’s put in the parameters of the function here. So it’s showing ‘Enter text’ instead of the ‘aaaaah’ I put in the event sheet.

What I WANT is to be able to choose the animation and update the text.

So when I set it up in the event sheet I see this

And I can choose the animation name and change the text but it doenst work on preview, it’s only showing what’s put in the parameter section, and I’m not sure what I’m doing wrong.

I think the error is in the parameters of the function, in that bottom section. I’m not sure what to change it to so that it will take whatever information is put in on the event sheet. It’s apparently possible because the dialogue box extension does it just fine, so I’m not sure what I’m missing. I tried leaving the fields blank or putting “” as a placeholder, but that didn’t work either.

For reference, this is what the dialogue box extension looks like:

and when you’re setting it up in the event sheet it looks like this:

See how you can choose the animation and enter the text, as with mine, but when you do it here it actually shows up on preview. (I don’t know if the behavior field is a factor?)

The dialogue box extension is really good but doesn’t quite suit my purposes, and because it seems to be using javascript or something, it’s not easy for me to just edit out what doesn’t work. So I thought I’d create my own functions but that doesnt seem to be working either.

I’d really appreciate any help, hopefully this wasn’t too confusing of a read! Thank you!

In this section:

The parameter “Text” is in quotes, it should be the parameter name without quotes.



1 Like

Oh wow. That was an embarrassingly simple fix lol :sweat_smile: I think I’d tried putting in _PARAM1_ (etc) but not the actual name. Thank you!!

Now I just have to figure out how to get this counter to work lol

1 Like