Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> [VX] Lighting fun with variables, Skill Level: Simple
Shaddow
post Aug 28 2012, 10:48 PM
Post #1


The Eventer Inventor
Group Icon

Group: Local Mod
Posts: 1,250
Type: Event Designer
RM Skill: Masterful
Rev Points: 90




Hi! So, I realize that this section of the forum is just plain dead, and that makes for a sad panda. SO! I've decided to start writing up simple, but useful, tutorials using nothing but events! This is the first one, it's how to increase and decrease the light level on your map using variables! Neat huh?! laugh.gif

Ok, ok, we will get on with the tutorial. Keep in mind this, like most events, works with both RMXP and RMVX.

First, you will want to create an autorun event on some section of your map. This event will require two(2) pages.

On that first page you will post something quite simple; first you will need to make a variable, I called mine 'lighting' clever, eh?

Secondly you will need to set that variable to a constant of zero(0), then you will also set a self switch of A to on. (Alternately, if you are planning on having the light reset each time you leave the room, you may set this as an actual switch, one that you can set to turn off whenever the player leaves the room.)

Now onto the second page! This one needs to be set to parallel process, as it will constantly be checked. On this page you will make a number of conditional branches, make a number equal to the amount of lights you plan to use, plus one(1). Each of these branches will be based off of the variable you just set! The first of them will be your default light value and be based on variable=0, you can have this as full light if you plan to make it darker, or as fairly dim light to make it brighter.

(Keep in mind that you don't want the map to be pitch black, or that can annoy a player, instead go for a darkish blue with a grey tinge, it should make things hidden but allow the player to see.)

Now you will continue to make conditional branches, one for each light, and use your best judgement on what to set the lighting to for each, keep it constant though.

(You should be using the 'Change Screen Color Tone' event button in XP and the 'Tint Screen' Button in VX for these.)

Attached File  before_ss.png ( 136.9K ) Number of downloads: 12
Before!
Attached File  after_SS.png ( 99.77K ) Number of downloads: 9
After!

Now, on to the fun part! You will make a number of events for your lights! You will actually only need to make one event and can copy and paste it, due to the variable! Yay for time saving!

Ok, this will, again, be a two(2) page event. On the first page you'll set the priority to 'Action Button' and 'same level as player' if on VX.

On the first page you will set a choice, usually you'll put something like 'light the torch' and 'ignore it' but you can flavor that however you want. If the player chooses to light the torch you will set the variable you set earlier to constant +1, then turn on self switch A. If they choose ignore, you need not put anything.

This will force the parallel process event to check the variable and increase the light on the map as needed.

Now onto the second page, this one can change depending on what you intend to do. If the player cannot dim the lights again, then you will either set it to be an active flame using the 'stop animation' tag so it looks burning, or you can set it to a dead flame or light if they are turning off lights.

If you intend to allow the player to turn off lights, you will simply need to set this page to the opposite of the first one, have the variable you set up earlier be a constant -1 and then turn off self switch A.

Well, that's all there is too it, rather simple really. It's not as impressive as the lights from some of the neat scripts out there, but it's simple and easy to use! cool.gif


__________________________




I support these projects! -------------





Go to the top of the page
 
+Quote Post
   
X-M-O
post Aug 28 2012, 10:54 PM
Post #2


Level 82
Group Icon

Group: Director
Posts: 6,347
Type: None
RM Skill: Undisclosed




Quick and easy eventing! Thanks for doing this, Shaddowval. happy.gif


__________________________
Go to the top of the page
 
+Quote Post
   
Shaddow
post Aug 28 2012, 10:56 PM
Post #3


The Eventer Inventor
Group Icon

Group: Local Mod
Posts: 1,250
Type: Event Designer
RM Skill: Masterful
Rev Points: 90




Yay a response! My last tutorial was kind of ignored T_T. More to come though! This is only the start! Viva la Eventolution!


....ahem....I may be a bit hyper...


__________________________




I support these projects! -------------





Go to the top of the page
 
+Quote Post
   
X-M-O
post Aug 28 2012, 11:02 PM
Post #4


Level 82
Group Icon

Group: Director
Posts: 6,347
Type: None
RM Skill: Undisclosed




Well, it will take a little bit of work to bring developers in here to learn a bit, but don't give up if you don't see replies (views will show how many people are paying attention even if they are just lurking and learning). =]


__________________________
Go to the top of the page
 
+Quote Post
   
amerk
post Sep 14 2012, 12:30 PM
Post #5


Level 56
Group Icon

Group: Global Mod
Posts: 1,784
Type: None
RM Skill: Undisclosed
Rev Points: 15




Fairly useful tutorial. I can see this expanded upon for even more challenges, such as a dungeon design requiring the player to light the torches within a certain time frame.


__________________________
Go to the top of the page
 
+Quote Post
   
Ndoelicious
post Sep 14 2012, 04:54 PM
Post #6


Level 15
Group Icon

Group: Revolutionary
Posts: 282
Type: Mapper
RM Skill: Intermediate
Rev Points: 50




Wait! A question!
Does X-M-O even use VX? xDDD


__________________________
One idiot is actually talk more than three geniuses combined!
-Patrick Star-

Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 24th May 2013 - 07:29 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker