!!

Welcome to Save Point!

Formerly known as RMVXP, Save-Point is a game creational forum that aids users in creating games using software like RPG Maker or Game Maker. Support is also available today for members and members can also upload and download resources and scripts to use in their games. If you are new or experienced we welcome you to register.

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[XP/VX/VXA Script] Initial Switches and Variables
PK8 Offline
I am the enemy. I am the antidote.

*****
Posts: 1,731
Joined: May 2009
View My Download Submissions
Thanks: 25
Given 8 thank(s) in 29 post(s)

Save Points: 8,947sp
Items: (View All Items)
Awards:

Gender: Undisclosed
Favorite Maker: RPG Maker XP
Post: #1
Initial Switches and Variables

Initial Switches and Variables
Once known as Autoswitcher

Introduction
This script allows users to set the initial values of switches and variables.

Features
  • Set which switches can turn on / off at the start of your game.
  • Set the initial values of any or all variables.

Script
Initial Switches and Variables (RMXP)
Initial Switches and Variables (RMVX)
Initial Switches and Variables (RMVXA)

Author's Notes
This version's a major improvement over my last two versions as they offer shortcuts in an effort to streamline the process of setting up certain variables and switches.

Formerly known as Punk.
He Used To Feel Invincible, But Now He Doesn't Feel At All...
07-13-2009 01:15 AM
Find all posts by this user Quote this message in a reply
EJlol Offline
Senior Member

****
Posts: 324
Joined: May 2009
View My Download Submissions
Thanks: 1
Given 2 thank(s) in 1 post(s)

Save Points: 4,194sp
Awards:

Gender: Male
Favorite Maker: RPG Maker XP
Post: #2
AutoSwitcher 2 [Exclusive]

Learn the difference between a hash and an array.

AS_Variables should be an array and not a hash. Thats why it should be:
Code:
AS_Variables = [] # Do not touch this.
and not
Code:
AS_Variables = {} # Do not touch this.

On a side note, the naming convention of Ruby is that constants (AS_Variables, AS_Switches) should be that each letter is uppercase. example: AS_VARIABLES and AS_SWITCHES

(the ruby naming convention can be found here:http://itsignals.cascadia.com.au/?p=7 )
07-13-2009 09:45 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Zeriab Offline
Member

***
Posts: 108
Joined: May 2009
View My Download Submissions
Thanks: 0
Given 0 thank(s) in 1 post(s)

Save Points: 406sp
Awards:

Gender: Undisclosed
Favorite Maker: RPG Maker XP
Post: #3
AutoSwitcher 2 [Exclusive]

AS_Variables obviously is a mapping from Variable ID to starting value.
Question is just how to implement it. Under the assumption that only a small fraction of the variables used in the game needs to have a starting value different from 0 it makes much more sense to use a Hash. Conceptually it's also easier to use a hash since the id => value is more explicit.
It's only from an optimization point of view that an Array should be considered. (You know, Direct Addressing)

I do agree that the constants should be upper case.

*hugs*

[Image: ZeriabSig.png]
07-14-2009 02:05 PM
Visit this user's website Find all posts by this user Quote this message in a reply
PK8 Offline
I am the enemy. I am the antidote.

*****
Posts: 1,731
Joined: May 2009
View My Download Submissions
Thanks: 25
Given 8 thank(s) in 29 post(s)

Save Points: 8,947sp
Items: (View All Items)
Awards:

Gender: Undisclosed
Favorite Maker: RPG Maker XP
Post: #4
RE: Initial Switches and Variables

Remade (with shortcuts aplenty) and renamed. Have a look.

Formerly known as Punk.
He Used To Feel Invincible, But Now He Doesn't Feel At All...
05-08-2012 09:58 PM
Find all posts by this user Quote this message in a reply
Post Reply 


User(s) browsing this thread:
1 Guest(s)


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
   Troop : Self Switches Kain Nobel 1 146 02-02-2013 01:07 PM
Last Post: yamina-chan
   [Unsupported] PK8's Self Variables XP PK8 4 979 03-08-2012 01:54 PM
Last Post: FoxDemonSoavi
   Skills That Use Variables DerVVulfman 2 1,256 01-06-2010 09:44 AM
Last Post: Queue
   Group Variables v1.1 PK8 2 804 11-12-2009 06:30 AM
Last Post: PK8
   Group Switches v1.1 PK8 2 681 11-12-2009 06:24 AM
Last Post: PK8
   [Unsupported] Actor & Party's Self Switches XP PK8 3 950 09-17-2009 01:46 AM
Last Post: Yin
   [Unsupported] Actor & Party's Self Switches VX PK8 0 549 09-16-2009 10:57 PM
Last Post: PK8
   [Unsupported] PK8's Self Variables VX PK8 1 683 09-16-2009 10:20 AM
Last Post: Kain Nobel



 Quick Theme: