Gw Temp

Menu

Tutorial - 'Lightning System' by ATARI

An item about RPGMaker 2000 posted on

Blurb

A tutorial on how to make lighting in your game. Written by ATARI.

Body

Hi Folks! It’s ATARI again. This time I’m going to talk about how to make a FF10 lightning system for your RPG



What you will need to know for this tutorial,

1. Variables

2. Switches

3. Set Event

4. Common Events



What is an FF10 lightning system? Well, if you’ve ever played FF10, there is a part of the game where you have to cross the thunderous plains. A long stretch of land where it has a thunderstorm that never ends. In there, lighting comes down and strikes the ground, and sometimes hits your hero, knocking them back. There are also lighting rods that attract lighting too. This tutorial is how to do this in your GAME.



The first thing you need to do, is make a new map. Make it’s size for this tutorial 100 x 40. (Make it bigger than that in the real game) Make the map whatever you like. Make sure there is a path in the middle. Now make a new common event, and have it be a parrell process event. Make it a wait 35.0 event, then make a new change variable event. Use variable “Lighting_Choice.” Make it choose between randomly between 1 and 3. Then below that event, make a fork option that says, “IF variable ‘lighting_choice’ is 1, then” in that else case, make a fork that says “IF variable ‘lighting_choice’ is 2,

then” and below in the next else, “IF variable ‘lighting_choice’ is 3, then” now go hit the apply button, the OK button, and go back to your map.



Make a new event on your map. Have it be a blank event, make it push key with nothing in the event. Name the event, “Lighting.” Now go back into the database, and make a new battle animation. Make the animation look like lighting striking something. Save the animation. Now go back to the common event and go under the first fork option.



This is the fork option that makes lighting just strike somewhere randomly on the map. It might be on the hero, it might be right in front of hero, because it’s random. Below that fork option, make a new change variable. Use variable “Lighting_PositionX.” Make it choose randomly between 1 and 40. Then

below that change variable event, make a new change variable event, “Lighting_PositionY.” This time, make it choose randomly between 1 and 100. Wait 0.1, play a thunder SE, wait 0.1 and then below that make a set event option. Make the map it does it on the lighting map you made. (Before you open the set event command, make sure the lighting map is selected.) Make the event be “Lighting” and move it with variables using the right variables. “Lighting_PositionX,” for X coordinate, and “Lighting_PositionY,”

for the Y coordinate. Wait 0.8 seconds, and show battle animation on event, “Lighting.” Wait 0.1, and set all the variables you used to Zero and put the lighting event in a corner where it originally was. Now it’ll go back to the beginning event.



Go under the second fork option. This is the fork option that will hit our hero. Make a new change variable. Make it play a thunder SE, and wait 1.5 seconds. Now make a fork option that says, “IF switch ‘safety’ is OFF, then” Make variable “Lighting_PositionX,” be equal to your hero’s X coordinate. Then below that make a new change variable event that uses, “Lighting_PositionY,” and uses the hero’s Y

coordinate. Then set the lighting event with variables “Lighting_PositionX,” and “Light_PositionY,” Then display the battle animation on lighting. Then, put the lighting event back to where it originally was and set all the variables you used to zero. Now you don’t need to program in anything for the hero right now. Make all the variables you used be set to zero. Now under the else case of that fork option, make a fork option. Make it says, “IF switch “SafteyL1,” is on, then” have the lightning event be set on the first lighting rod event, and then strike lighting down the battle animation. Then below that in that’s else case, make another fork that says, “IF switch “SaftleyL2,” is on, then” make it strike the second lighting rod by putting “Lighting” on it, and striking. Do the same with next else cases and with the lighting rods. Of course, at the end of each fork, make it set the lighting event back to where it originally was, and all the variables you used to zero.



Now go back to the map. On the outside of the path, make some events. Make six of them, and have 3 be on different sides on the path, and spread out every which way. (Don’t have two across from each other.) Make there graphics look like something popping up out of the ground, and have them be on the same layer as the hero is. (Another words, your hero cannot walk over them.) These are you’re lighting rods. Make a new change variable event. Make it’s variable “LightingRod.” Make it choose a random number between 1 and 6. Then below that, play a thunder SE, wait 1.0, and then make a fork option that says, “IF variable “LightingRod” is equal to 1, then” make “Lighting” come under the first lighting rod event, and then have the battle animation strike it. Do the else case with it being 2, and striking the second lighting rod. Do the same for the 3rd, 4th, 5th, and 6th lighting rods. And the end of all those, make it return the “lighting” event back to where it originally was and all the variables you used to zero.



Now go back to your lighting map, and make a new parrell process event. Make it’s graphics blank, out of reach and below hero. Call it “Lighting Strikes.” This is the event that will make what happens to your hero when they are struck by lighting. Make a new change variable event, use variable “LightingX,” and set it to event “Lighting”’s X coordinate. Below that set variable “LightingY” to “Lightnings”’s Y position. Below that, make another change variable event (this should be your 3rd one in this event) and use variable “HeroX.” Set this variable to hero’s X coordinate. Below that make a change variable event using “HeroY.” Set this variable to hero’s Y coordinate. Now in a fork option below, make a fork that says, “IF variable ‘HeroX,’ is equal to variable ‘LightingX,’ then” and then another fork directly below that that says, “IF variable ‘HeroY’ is equal to variable ‘LightingY,’ then” below that, make it change your hero’s graphics to your hero laying on the ground, and wait 8.0 seconds, and then change your hero’s graphics back to normal. There is no chance that you hero can get struck by lighting again while he is on the ground, because lighting happens every 45 seconds, not 8. Of course, if you want, you can add an event that takes away hero’s HP when they get struck.



Now around each lighting rod event, make it be surrounded by event’s once. (Make 4 events around the light rod) Make them on hero touch. Now on the first lighting rod, make then turn on switch “Safety” and “SafteyL1.” Around the second have them turn on switch “Safety” and “SafteyL2.” Get the picture? Do the same for all the other lighting rod events. Now surrounding all of those events, make new events around the 4 events you made. Make each of them on hero touch. Make them turn off the switches that the 4 events directly around the lighting rod turned on. Do this for each lighting rod. Now you can make it so there is safety when you are under the lighting rod, but not when you leave.



Now you can make the map bigger and larger so it takes more that 45 seconds to cross. Don’t forget

though, you can change it so that it’s only 25 seconds, 40 seconds, or whatever you want it to be. You can also make other maps with it too with different common events and such.



So that’s basically it to making a Lighting System in your RPG.



Good Luck!

Remember,

“Even the greatest gamers were n00bs.”

- ATARI