02-28-2008, 11:31 AM
I decided to take a small break from my project and work on a small script.
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
No demo needed. Instructions are easy to follow, the script is easy to use.
Script
First, go to Scene_Title. Find: and replace it with Next, create a new script above main and name it "Scene_Autoswitcher" then copy the script below.
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: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: 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.
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.
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
Code:
$scene = Scene_Autoswitcher.new
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
"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...
Changing more than one variable...
To change more variables, look for this:
Code:
# Insert more "$game_variables[id] = value below...
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.