RPG Maker MZ - opening external web links on hosted server

draszje

Warper
Member
Joined
Sep 19, 2021
Messages
1
Reaction score
1
First Language
English
Primarily Uses
RMMZ
Hi all,
I'm currently making a web game in RPG Maker MZ. I'm hosting the game on my own server (for testing purposes). It's a game that I'm making for a school. Part of the game is that within the game the player must be able to open a link to an external page. For example a link to a page about s specific topic or a page where they can fill in a form.

Now I know there is a plugin available for RPG Maker MV from Yanfly (External_links_YEP), but unfortunately that doesn't work in MZ.

You can use a simple JavaScript snippet like:
window.win = window.open('[URL='https://www.rpgmakerweb.com/%27);']https://www.rpgmakerweb.com/');[/URL]
But the problem there is that the link does work, but it's blocked by the pop-up blocker of your browser.

So basically my question is if there is a way to stop the pop-up blocker from blocking the pop-up window from within RPG Maker MZ?

Anyways, thanks for all of your time!
best regards,
Andreas
 

Dev_With_Coffee

Veteran
Veteran
Joined
Jul 20, 2020
Messages
967
Reaction score
470
First Language
PT-BR
Primarily Uses
RM2k3
Hello and welcome!

The most used javascript command for this is this one, recommending only for the game distributed for Web Browser:
JavaScript:
window.open('http://rpgmakerweb.com')
Or:
JavaScript:
open('http://rpgmakerweb.com')

If distributing for Windows, Linux or MacOS, this opens the computer's default browser:

Good luck
 

Latest Threads

Latest Posts

Latest Profile Posts

Hello again, guys! Today, I come to you with not one, not two, but THREE new emotion busts for Ramona!
RAng2FPS.gifRAng5FPS.gif
Anger

RWin2FPS.gifRWin5FPS.gif
Wink

RCry2FPS.gifRCry5FPS.gif
Crying
Feels like I've been butting heads with people more often, especially on here. Hoping I'm not being unreasonable, I've been trying to be more honest about how I'm feeling.
SF_People2.png added!
index.php

I wrote a script everything worked fine until IDs and Names weren't being stored/called proper.. Turns out I used ' j ' instead of ' i ' for grabbing array element. 2 days of bug testing and rewriting to overlook a single little letter. I'm changing my default loop variables. Any recommendations? Maybe n & m? Kidding lol.

Forum statistics

Threads
118,750
Messages
1,118,418
Members
155,902
Latest member
blabla321
Top