QUOTE (Blood_RzR @ Jun 17 2010, 04:13 AM)
lol I'm a total noob but.... what IS common events been hearing them all over the place can you give me a little explanation, and if they are important? if they are I'll just google as i've got to sleep now so i thought i'd post this here
Important? I find them to be. Sure, you can get by without them in some games... mostly. But they have uses that nothing else will replace.
Here's the deal:
A Common Event is an event that is not tied to a specific map location. Instead, it can be called from anywhere in the game.
There are three types of Common Events-- Called, Parallel Process, and Autorun.
Autorun and Parallel Process both work the same way-- the event is activated by a switch, and they immediately start the event running when the switch is ON. Remember, of course, that they will continue to cycle as long as that switch is on.
Therefore, for any event that you do not
want to run continuously, include a code to turn the switch off. (Also bear in mind that Autorun events, when running, forbid the player from doing anything. An Autorun event that has no "Off" switch will therefore lock the game.)
For example, if you want to have a game in which the characters automatically fully recover after every battle, you could have a Parallel Process Common Event, triggered by a Switch that is turned on at the beginning of the game, that continually uses Recover Party. Parallel Processing events don't run during battles, so you'd constantly recover after battles no matter what map you are on.
Called Common Events are, in many ways, the most useful. A Called Common Event is Called by coding elsewhere, using, for example, the Call Common Event command. One major use of this is to save yourself from recreating a complex series of event commands that you'll be using frequently-- especially things like Battle Events that run during every fight.
However, there are two other ways to trigger Called Common Events that there is no replacement for in the game.
1: Items. If you look at Items, you will see that they can trigger a Common Event. This means that you can, if you want to, create an Item to do anything--
it's how you create maps, teleport rings, technique scrolls, and cell phones that let you call the base for further instructions.
2: Skills. Yes, skills can call a Common Event in addition to
their normal effects. Note that if you do this, the Common Event will run after
the regular effects of the skill have all finished. This is key to interesting and original Skill creation-- use this to summon monsters, cast spells that protect the party while cursing the monsters, create life drains without needing a script, or have the entire screen shake during an Earthquake spell.
Another note about Common Events: You can
refer to Self-Switches and "This Event" in Called Common Events, and it's very useful. What will happen is the event will use them to refer to the Event running the Call Common Event command. It comes in handy if you're creating guards that are looking for the player, or free-roaming monsters that attack you if they see you.