[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 113: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Field Day Forums • Exit to tab from plaque
Page 1 of 1

Exit to tab from plaque

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

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

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.

Thanks!