Save-Point
[Unsupported] Punk's Autoswitcher - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Material Development (https://www.save-point.org/forum-8.html)
+--- Forum: Scripts Database (https://www.save-point.org/forum-39.html)
+--- Thread: [Unsupported] Punk's Autoswitcher (/thread-2310.html)



[Unsupported] Punk's Autoswitcher - PK8 - 02-28-2008

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.