Save-Point
Simple eventing - The King's Speech - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Tutorials (https://www.save-point.org/forum-19.html)
+--- Thread: Simple eventing - The King's Speech (/thread-3496.html)



Simple eventing - The King's Speech - Pherione - 05-20-2011

Simple events - Making the king's speech

by Pherione
[Image: sspeech.jpg]

In this guide we shall make a scene using only the events from RPGMaker XP. No scripting required.
Before taking this on, you must have at least taken a look at events, know how the interface looks.

Describing the scene from a player's point of view, it goes as such:
-The player automatically walks up the red carpet towards the king, where a dialogue takes place, then another npc walks up to them, hands them the 'Passports' and returns to her place. The dialogue is finished up and the player is free to walk around and explore the rest of the room.

First some hints on the long term of your game:
  • Make a story variable that tracks the overall progress of the player through the game story. You can use this variable to check which events are yet to take place and which have already taken place.
  • Make sure the characters that require movement don't walk too long a distance. Nothing is as annoying for a player to just look at a character walking over the screen, so keep it at a minimum!
  • Get all the items, monsters, etc you need ready in the database (F9), in this case, make an item called 'Passports' which really serve no real function since it's a key item
Making your room
We start by making the normal scene where the player would be able to walk freely and talk to the npcs. There is nothing out of the ordinary in this, just characters and their generic dialogue lines. Make a king on his throne and a lackey close to him.
When you've done this, make an event without graphic and put it in the corner of the map (very advisable for this kind of empty graphic events, so you can always find them again easily when editing your game)


The event process
Now for the event sequence:
1) Conditional branch, to check whether the event has to take place. You can use the story variable or a custom switch.
Conditional branches generally consist of a true and a false part. You can remove the second part by unchecking 'set handling when conditions don't apply'. Leave it on for now, we need it to make sure the event stops, otherwise the event will be checked constantly which takes up a lot of processing space.
2) Set move route, put it on 'player' in the dropdown box, so you move the player character without the player controlling it. Put enough move up's so the character comes in front of the king. One up = one tile up, easy enough
3)Optional: Wait for move's completion, if you want to wait until the previous moves of the character have been completed before commencing the rest of the event, put this, otherwise skip to 4)
4)Place your dialogue with the king, in this version, the king mentions he will give you passports. Obviously he's a king, he isn't going to give them himself, but order one of his lackeys to do it for him.
5) Another Set Move route, In the set move route settings open the drop-down box above the action list and set it to the event that represents the lackey character. Now the move route will control the lackey. Set out a move route that brings the lackey to the player. Make sure he faces the player at the end!
6) Wait for move's completion (again)
7) A text message: "Here are your passports" or something of the sorts
8) optional: play some music effect to show that you received something of value (under 'Play ME')
9) Change items; Passports; increase; Constant 1; to raise the number of passports in the player's inventory by 1
10) optional: Text message: "Got passports."
11) Set a new set move route to make the lackey return to her original location
12) Wait for move's completion
12) Set the story variable or the switch so the event won't start all over again
13) Erase event underneath, this will remove the event, making sure it stops.
14) last but not least, put an erase event in the else part as well to prevent checking the event to loop and take up space.

Finally, put the event on autorun, so it checks whether the event must be run from the start of entering the scene.
If your autorun messes up, try parallel process.

Autorun: Runs your event, besides your event, nothing else can happen, except for parallel processes. Players can't move on their own. This one is good for events such as the one in this tutorial but sometimes it gets quirky. Look out for endless loops or freezes Use Parellel process if autorun messes up and vice versa.
Parallel process: Allows you to stack processes, multiple things can happen at one time. You have to look out for not overstacking your buffer. You might get lag or freezing if you use this too much. Examples to use this: two npcs have to be running around at the same time and you want to spread the events. Or a timer counting down during your game. Again, use Parellel process if autorun messes up and vice versa.

Try it out


If there are any questions on this, post it here. Anything else, pm me.
My version of this will be playable in the demo of my upcoming project, so unless there's really demand for an example project, I won't be making one.