Main Menu
  • Welcome to The RPG Maker Resource Kit.

open a website from an event [VX Ace request]

Started by jackspinoza, January 29, 2013, 01:00:49 PM

0 Members and 1 Guest are viewing this topic.

jackspinoza

To whom it may concern,
Thanks for taking a moment to read this request. I've been trying to make an event where the player is given a choice to open a website. My problem is I still can't get my head around scripting.  I thought I could use something like this to show walkthroughs or make colourful puzzles or enhance the story using a related blog.

I need it to:
*open a website from an event script in RPGmaker VX Ace


I've seen Modern Algebra made a fantastic website-opening-script here: http://rmrk.net/index.php/topic,44535.0.html
That's what gave me the inspiration and the realisation that such a thing might be possible. But it works from the title screen and not whilst playing. Perhaps I'm asking for something that isn't possible.

Thanks in advance and keep well.
J

D&P3

Use this:


# Use The Following in a Script Call:
#       open_website( url )
# Replacing the URL  with a websire url in quotation marks
# So the Following would be valid:
#   open_website( "rmrk.net" )

class Game_Interpreter
  def open_website( url )
    url.gsub!("http://", "")
    Thread.new { system("start http://#{url}") }
  end
end


The Code was taken from Modern Algebra's script and fixed up for you, so don't credit me for it.
All of my scripts are totally free to use for commercial use. You don't need to ask me for permission. I'm too lazy to update every single script post I ever made with this addendum. So ignore whatever "rule" I posted there. :)

All scripts can be found at: https://pastebin.com/u/diamondandplatinum3

jackspinoza

Thank you so much! I was miles off the mark with where I was going. I hope I didn't inconvenience you too much and I hope this might be useful for others.

And so fast!