• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Question] Eventing Assistance

  • 60
    Posts
    5
    Years
    Heyo forums! Been a while!

    I've gotten onto adding the more important events in my game, and despite my best efforts,....
    I suck at it.

    SO! I need some help with the basics of scripting events. I am a reasonably capable programmer, so I just need some pointers. Some things I particularly want to understand well are:

    Self-switches: What do they do, how can I use them?
    Game switches: Generally what they do.
    Transitions.
    Cutscenes: I want to make a couple, so a bit of help here is very appreciated!

    Anyways, thanks forums! The help is appreciated
     
  • 137
    Posts
    3
    Years
    • Seen yesterday
    Self switches are switches that are limited to the events themself and can be triggered in the events to be turned on or off. For example, Simple trainer events use self switches to disallow players from infinitely battling them after defeating them for the first time. Here is an example of where I used a self switch in my own game.
    Spoiler:

    The event here autoruns a story dialogue. Once completing the dialogue, a few switches are enabled including the self switch. The self switch allows the following event, which allows the player to heal their pokemon, to play out when speaking to the woman again, without having to create a unique script for her.
    Spoiler:


    Game switches (Which I guess I should have explained first lol) are similar to self switches but instead of being limited to the event they are triggered in, they are universal to the entire game. In this event in my game, the player enters a house and communicates with an npc.
    Spoiler:

    At the bottom of the event command list, 2 game switches are listed; one is turned off and another is turned off. The one turned off is the switch that allowed this event to play out, by turning it off I ensure that the player cannot repeat the same event once completed. The switch turned on allows an event outside of this one to occur.

    By transitions I'm not sure if you mean map transitions or cutscene transitions. If you're talking about maps then transitions are pretty simple to make.
    Spoiler:

    This event transfers the player to another location or map. A sound effect is played, followed by the screening fading black. Then after a few frames, the player is transferred while the screen is black. The screen then fades to normal again. Additionally, if you don't feel like making these yourself you can always just copy them from door events in the default pokemon essentials maps.

    A lot can be done with cutscenes so I'll show some of the basics
    Spoiler:

    The NPC, once interacted with, greets the player. Afterwards the screen fades out entering a cutscene, then after a few frames the screen fades back in (This isn't necessary but I prefer using this method). I use the screen fade in and out to change the position or locations of some events to my liking before the screen is visible again. A conversation is had between the player and other NPC's. During the conversation an unknown NPC announces themself, causing the other ones to show the "Question bubble" animation. I split the animations up by a few frames so they wouldn't go off all at once.
    Spoiler:

    The NPC's all face her as she then moves towards the player. I use the "Wait for moves completion" Command to essentially do as it says. It waits for the move to be completed before any other command can continue.

    Sorry if any of this sounds confusing, I've only been using essentials for a few months and have been learning as I go so I'm pretty new to this aswell
     
  • 137
    Posts
    3
    Years
    • Seen yesterday
    If my explanation kinda sucks (Which it probably does) you can learn a lot of the basics of essentials from the same place I learned it, here.
     
  • 60
    Posts
    5
    Years
    Ok, so to recap what I get from your explanation:
    I can use game switches to control storyline events and cutscenes in the game

    I can use self switches to control individual events (ie.npcs and battles)

    I can use the move commands to move events and npcs, as well as the player around on a map, and I can use the transition effects to control an event or cutscene a little more

    I'm also reading a sort of direct order of importance with each command (that's a bit unclear. what I mean is that the code is read by RPGEXP one line at a time in the order they are written). Am I right?

    I hope I got all of that. This was a very good explanation, and I feel a lot better. I have been In the process of developing a game for a while now, but Have very little experience in events, so I found this very Helpful. The playlist of videos looks like it will be a load of help!

    Thanks @Ayrei!
     
  • 20
    Posts
    3
    Years
    • Seen Oct 2, 2021
    Just wanted to add something. Ayrei's explanation was perfect, but you should also include Variables when creating an event with multiple layers.
    You'll find the toggle command Set Variables just near the one for Switches and Self Swithches.

    Variables are like multiple layered Switches, if you use them right. Instead of using a Switch to activate and event you can use Variables to make the event progression smoother. For Example:
    - If Switch "Beginning" is ON, then it makes the player tal with the Pokémon Professor. Then you use another Switch to make them choose the starter Pokémon and another one to make sure that the following event in the same area happens.
    - But if you use a single variable, let's call it "Event at the Lab", you can make so that if this variable is "1", then the event with the Professor happens, and when it ends it will set the Variable at "2", making the choice of the starter possibile, and so on.

    This way you can reduce the amount of Swithces needed to conclude a single event in a single area and make it a well organized work.
    Then, when the event is done, use a Switch called, for example, "End of the Lab Event" that will wrap up every event in the map like they should be when it's all over.
    Self Switches are also great, but when you are dealing with cutscenes you'll be managing a lot of different events, be it characters or map tiles, and Self Switches are more practical when dealing with a single event. But if you want to use Self Switches to make certain events disappear during a cutscene, you can use "pbSetSelfSwitch(X,"A",true)" or "pbSetSelfSwitch(X,"A",false)" to toggle with the events self switches even in more complex cutscenes!
    X is the number of the event, while "A","B","C" or "D" is the Self Switch you are activating (if true) or deactivating (if false).
     
  • 60
    Posts
    5
    Years
    That sounds very interesting...

    So continuing the example of "Beginning", I could make one single sort of event, then set up multiple variables that trigger as the event "progresses"? Say I start event "beginning" when the player "speaks with mom", and var 1 is then turned on, to signify that the player has completed the first section of the event "beginning". Then I could let the player wander over to the professor and walking into the event tile triggers var 2, which signifies the player speaking with the professor, etc. Is that what you mean?
     
  • 20
    Posts
    3
    Years
    • Seen Oct 2, 2021
    Yes, that's pretty much it. Let's make up a scheme to illustrate it even clearly.

    The game starts. Variable "Beginning" is default 0.

    Event "Mom": If Variable "Beginning " is 0 she will greet you with "Hey, you should go see the professor!" and set the Variable to 1.
    The "Mom" even could have a different page where the variable is 1 where her line is sligthly different, because it's the second time you approach her and she might say something else.

    Event "Professor": If Variable "Beginning" is 0, this event does not exist. That will make sure that you have to speak to your mother first.
    If Variable "Beginning" is 1, then the Professor will greet you and make you choose one of the three Pokéball on his table, and set the Variable to 2.

    Event Pokéball: Those are three separate events that follow the same pattern.
    If Variable "Beginning" is equal or less than 1, this event will say "It's one of the Professor's Pokémon", hence indicating that you still cannot pick one.
    If the Variable is 2, each event will let you choose a Pokémon and set the variable to 3.

    Now things get tricky, because you will want one of the three Pokéball disappearing (the one you chose) and the other 2 remaining there.
    So you need to apply two more pages to each event.

    The first page is "If Variable "Beginning" is equal to 3, this event will show "It's one of the Pokémon you didn't choose" ". This way you will be creating a page for the event that will activate for the simple reason that you did not pick the ball.
    Then another page, and it MUST be on the far right so it gets priority in the event chain, that reads like this: "If selfswitch A is ON, this event disappears". So when you make one of the three starters picked, you also have to activate the Self Switch A for that specific event, so it is the only one that disappears, while the other two, having the same event pattern, will read only the page with the variable set to 3, hence remaing where they are and not being interactable anymore.

    It's a little confusing at first and I tried to summarize at my best, but once you get the gist of things it gets really easier.
     
  • 60
    Posts
    5
    Years
    Fantastic! I am glad I did not get it completely wrong.

    Thank you for all the help, this thread has answered so many questions about eventing, and with it, I feel confident to start setting up my events!
     
    Back
    Top