[Unsupported] Punk's Autoswitcher
#1
I decided to take a small break from my project and work on a small script.

Autoswitcher by Punkid89

Introduction
After years of creating event systems, one thing I had grown tired of was having to make a map event activate some switch just to start a couple of my common events. No more having to activate the switch via some random map! *celebrates*

This script allows the game creator to activate the switches they want to activate AND alter the values of the variables they want altered.

Features
  • Easy to use.
  • Activates switches you want activated.
  • Alters variables you want altered.
  • Activates and alters BEFORE your game starts
  • You no longer have to rely on an event in a particular map to activate a few switches and change the variables.
Screenshots
No demo needed. Instructions are easy to follow, the script is easy to use.

Script
First, go to Scene_Title. Find:
Code:
$scene = Scene_Map.new
and replace it with
Code:
$scene = Scene_Autoswitcher.new
Next, create a new script above main and name it "Scene_Autoswitcher" then copy the script below.
Code:
#------------------------------------------------------------------------------
# AutoSwitcher by Punkid89.
# This script automatically activates the switches you want it to activate and
# alters the value of the variables you want altered before the game starts.
# Possibly a useful tool for eventers.
#------------------------------------------------------------------------------
class Scene_Autoswitcher
  def main
    #--------------------------------------------------------------------------
    # activating the switches you want activated.
    # $game_switches[id] <- ID being the switch ID.
    $game_switches[1] = true
    # Insert more "$game_switches[id] = true below...
    
    
    #--------------------------------------------------------------------------
    # Alters values of the variable IDs you want altered.
    # $game_variables[id] = value <-- ID: Variable ID, Value: Variable integer.
    $game_variables[1] = 20
    # Insert more "$game_variables[id] = value below...
    
    
    #--------------------------------------------------------------------------
    # Now it redirects to Scene_Map. Have fun!
    $scene = Scene_Map.new
  end
end
Instructions
"Wait a sec, what are those!?" Don't worry, let's take a look at a couple of things you may not be so sure of.

$game_switches
First, $game_switches.

ID: Switch ID.
Boolean: true or false (True: ON, False: OFF)

$game_variables

ID: Switch ID.
Value: A number, any kind of number for your variable.

Activating more switches...
To activate more switches, look for this:
Code:
# Insert more "$game_switches[id] = true below...
Below that line, add a switch you want to activate. (Please refer to $game_switches section.)

Changing more than one variable...
To change more variables, look for this:
Code:
# Insert more "$game_variables[id] = value below...
Below that line, add a variable you want to alter. (Please refer to the $game_variables section.)

FAQs
Awaiting question...

Compatibility
Definitely not SDK compatible.

Author's Notes
I created this because I was tired of having to activate a common event by making an event on a particular map which activates a certain switch just to start a common event.

SephirothSpawn did suggest a few things when I submitted this onto his forums.

Punk totally does not support this script!

Terms and Conditions
No credit.
Reply }


Possibly Related Threads…
Thread Author Replies Views Last Post
   [Unsupported] PK8's Self Variables XP PK8 4 10,375 03-08-2012, 01:54 PM
Last Post: LilyKnight
   [Unsupported] Title Skip 2 XP PK8 3 9,420 02-17-2010, 12:01 PM
Last Post: Villain
   [Unsupported] Actor & Party's Self Switches XP PK8 3 8,780 09-17-2009, 01:46 AM
Last Post: Yin
   [Unsupported] Title Skip 1 PK8 2 6,948 09-15-2009, 10:44 PM
Last Post: DerVVulfman
   [Unsupported] Force Save Before New Game PK8 0 4,898 12-07-2008, 04:44 PM
Last Post: PK8
   [Unsupported] MapSwitch! XP PK8 0 4,877 12-07-2008, 04:39 PM
Last Post: PK8
   [Unsupported] Auto Tone PK8 0 5,320 12-07-2008, 03:06 PM
Last Post: PK8
   [Unsupported] Force Save Before Something PK8 0 4,636 12-07-2008, 02:35 PM
Last Post: PK8
   [Unsupported] Game Disc 1 and 2 PK8 0 4,645 12-07-2008, 02:34 PM
Last Post: PK8
  Zeriab's Autoswitcher Zeriab 0 4,283 03-05-2008, 02:47 PM
Last Post: Zeriab



Users browsing this thread: 1 Guest(s)