Page 1 of 1

Exit to tab from plaque

Posted: Mon Nov 28, 2016 9:29 am
by jwshin94

I'm trying to use ARIS.exitToTab('Map') from plaque, but when I press the continue button, instead of going to tab, the text simply disappears from the plaque while still staying in the plaque mode. Is there a bug in ARISjs, or is there something else that I'm currently missing?

Thank you!

Re: Exit to tab from plaque

Posted: Thu Dec 01, 2016 4:45 pm
by chrish
There might be a problem in how it's being implemented. What does you plaque look like exactly, and are you choosing JS as the continue button function in the editor?

Re: Exit to tab from plaque—ARISJS and buttons

Posted: Tue Apr 18, 2017 1:48 pm
by chrish
I came back to this because I'm looking into the places where ARIS lets you take over a button already present in the interface via Javascript. I realize that this is what you were talking about but I didn't previously (I misread and thought you were talking about sending someone *to* a plaque *from* a conversation.

Let's see if we can unpack what your question was really about and maybe get somewhere. Running JS from many parts of ARIS seems to be possible and yet many of them are a mystery to me.

In plaques, you have three choices for the "continue" button. The default is that the button says continue and sends the player out of the plaque. Another option is to get rid of the button altogether. Watch out here as then the player has no way to exit the plaque without force quitting ARIS. The third option is javascript. I don't know what it does or how to use it. Maybe someone here does. My guess: with a bit of javascript, you can make a custom button that has custom text visible to the player and whose pressing might do any number of things. Where to put the javascript and what javascript you may or may not need to instantiate that particular button seems a mystery.

Another place in ARIS with something similar is in Quests. Again, for the button, you can choose javascript as an option, but it is unclear both where to put javascript and whether you need to bracket off or set up the particular bit that applies to just the button.

Finally, when you create an event, you have the option to "run JS". I guess that you would put javascript in the "what " box, but it's just a guess. And then the script would be run when the event is triggered, whether it is a standalone event or one that is attached to a plaque or some other object.

Re: Exit to tab from plaque

Posted: Mon Apr 24, 2017 4:17 pm
by chrish
I've got some good news!

My collaborator discovered a bit of help, waiting there all along. The thing that you'll need to make use of the JS buttons in quests and plaques is the ARIS.hook(). See the example below.

Code: Select all

<script type="text/javascript">
var ARIS = {};
ARIS.ready = function() {

ARIS.hook = function()


Two other important things to note here:

1. When you want to exit to a tab, like the map, the correct usage is the name of the tab in all CAPS (e.g. "MAP"). There has been a lot of confusion over this in the past, and just today, I've fixed a couple places in the documentation that were incorrect.
2. It seems like there should be a way to retitle the buttons ("Continue" and "Begin Quest"), but I haven't been able to do this.

Re: Exit to tab from plaque

Posted: Tue Jul 24, 2018 12:55 pm
by jdolane5
This thread has really helped me out a lot, so I'd like to keep it going. I was having the same problem with exiting a plaque to a desired tab. Firstly, the ARISjs fuction

ARIS.hook = function()

really solved it for me. My question is: What does this function actually do? I would like to know for future reference.

Second, I am also still looking for a way to change the text on the 'exit' button.


Re: Exit to tab from plaque

Posted: Fri Feb 08, 2019 5:32 pm
by chrish
I believe that's just a preregistered function within the API that the ARIS app knows to look for at certain points.