#author("2026-06-18T06:56:56+09:00","default:admin","admin") #author("2026-06-18T06:57:18+09:00","default:admin","admin") ''[[Beginner Tutorial INDEX:https://rpgbakin.com/pukiwiki_en/?RPG+Developer+Bakin+Beginner+Tutorial]]>>'' *Creating an Event 2 [#o2ddf0c5] ''Let’s create an event where, once the player fulfills the condition proposed by an old man standing on the map, a mechanism activates allowing passage across a cliff in front of a cave.'' ''The process will become a bit more complex from here.'' ''For now, follow the instructions step by step. You can review the overall flow later.'' **Creating a Custom Event [#s2b77ff8] **"Old Man" Event [#saeab0cb] ''Let’s begin by creating the event for the old man.'' Up to this point, we've been modifying event templates, but now we’ll create a custom event from scratch. ''First, select a grid tile in front of the cliff on Map_2, then press &size(18){"G"};''. This will open the Event Editor and create a blank event. ''You'll use this action frequently, so be sure to remember it!'' #ref(./Creating an Event 2_1.jpg,40%) #br ***"First Conversation" Sheet [#aec8d415] ''First, in section (1) of the Event Editor, rename the event to Old Man.'' Next, we’ll create four event sheets for this event. ''Note:'' '''Feel free to change the event sheet names and dialog text as you like. To keep things simple, we’ll focus on the event flow and skip animations or character movements—you can customize those later.''' ''In section (2) (Sheet List)'', double-click the event sheet name and change it to First Conversation. Next, ''click the arrow next to “Graphic Name” (3)'' to set a graphic for this event sheet. In the Asset Picker, go to the "Ready-to-Use" tab > 2D Stamps > 2D Casts > Support Casts, and select Senior Citizen A. For the motion setting, select "Wait", then click the Add and Exit button. #ref(./Creating an Event 2_2.jpg,40%) #br Once the graphic is set, create the event content with the following steps: ''1. Click the "+" button to open the Command Selector, and from the Conversation category, add a "Display Conversation" panel.'' In the "Text to be Displayed" field, enter the following: '''If you bring me the item from that treasure chest, I’ll let you cross over here.''' '''Here, take this key to open it.''' Click the “Cast 2 to be Displayed” field, then select “Ready to Use” tab > 2D Stamps > 2D Casts_For Conversation > Support Casts > Senior Citizen A > chr018 from the Asset Picker, and click the “Add and Finish” button. Select “Normal” for the expression. Turn on the “Make Cast 2 Talk” checkbox. #ref(./Creating an Event 2_3.jpg,40%) #br ''2. From the Status category in the Command Selector, add the "Increase/Decrease Item" panel.'' Click the "Select Item" field and choose Golden Key from the Asset Picker. #ref(./Creating an Event 2_4.jpg,40%) #br ''3. From the Conversation category, add the "Display Message" panel.'' In the "Text to be Displayed" field, enter: '''You received the key.''' #ref(./Creating an Event 2_5.jpg,40%) #br ''4. From the Switch category, add the "Event Switch ON/OFF" panel.'' Click the "Event Switch Number" field to open the Select Variable Box dialog. In the "Local" tab, click the Add button to create a new switch. Click the name field for the newly created Local0, and rename it to ''“Got Key“''. #ref(./Creating an Event 2_6.jpg,40%) #br The "First Conversation" sheet will look like this when complete. #ref(./Creating an Event 2_7.jpg,40%) #br ***"Before Obtaining the Item" Sheet [#t138c6a8] ''Next, let's create the event sheet that plays when you talk to the old man again before opening the treasure chest.'' ''1) In the Sheet List, select the “First Conversation” sheet, then click the Add button to create a new sheet.'' Rename the new sheet that appears above the “First Conversation” sheet to “Before Obtaining the Item.” ''2) In the “Sheet Conditions” section, click the Add button and choose “Event Switch.”'' Click on the Event Switch field, then in the “Select Variable Box” dialog, go to the “Local” tab and select “Got Key,” then click OK. Leave all other settings unchanged. ''3) In the “Command Scripts” section, use the Command Selector to add a “Display Conversation” panel.'' Enter the following text into the “Text to be Displayed” field: '''What? You still haven't brought me the letter?''' Turn on the “Make Cast 2 Talk” checkbox. Your “Before Obtaining the Item” sheet should now look like this: #ref(./Creating an Event 2_8.jpg,40%) #br ***"After Obtaining the Item" Sheet [#gb40353f] ''Now let’s create the scene that plays after opening the treasure chest and bringing back the item.'' ''1) In the Sheet List, select the “Before Obtaining the Item” sheet, then click the Add button to create a new sheet.'' Rename the new sheet that appears above the “Before Obtaining the Item” sheet to “After Obtaining the Item.” ''2) In the “Sheet Conditions” section, click the Add button and choose “Items.”'' Click on the Item field and select the “Spirit Orbs” from the Asset Picker. Leave all other settings unchanged. ''3) In the “Command Script” section, use the Command Selector to add a “Display Conversation” panel.'' Enter the following text into the “Text to be Displayed” field: '''Ah, yes, that's it. Now, step onto the stone block and cross to the other side.''' Turn on “Make Cast 2 Talk” and set the expression to “happy.” ''4) From the Command Selector, go to the “Switch” category and add a “Event Switch ON/OFF” panel.'' Click the “Event Switch Number” field, then in the opened “Select Variable Box” dialog, go to the “Normal” tab and click the Add button. Click the name of the newly added “Variable0” and rename it to ''“Gave the Item.”'' Your “After Obtaining the Item” sheet should now look like this. #ref(./Creating an Event 2_9.jpg,40%) #br ***"After Giving the Item" Sheet [#s303cf3b] ''Finally, let’s create the scene that plays when you talk to the old man after handing him the letter.'' ''1) In the Sheet List, select the “After Obtaining the Item” sheet, then click the Add button to create a new sheet.'' Rename the new sheet that appears above “After Obtaining the Item” to “After Giving the Item.” ''2) In the “Sheet Conditions” section, click the Add button and choose “Event Switch.”'' Click the Event Switch field, and in the “Select Variable Box” dialog, go to the “Normal” tab and select “Gave the Item,” then click OK. Leave all other settings unchanged. ''3) In the “Command Script” section, use the Command Selector to add a “Display Conversation” panel.'' Enter the following text in the “Text to be Displayed” field: '''Hurry along now.''' Turn on “Make Cast 2 Talk” and set the expression to “normal.” Your “After Giving the Item” sheet should now look like this: #ref(./Creating an Event 2_10.jpg,40%) #br ''That completes the old man's event.'' ''Next, let's place the treasure chest that gives you the item.'' **Treasure Chest Event [#n9f31301] ''To obtain the Spirit Orb, we’ll modify an event template to create a custom event.'' ***"Check the Treasure Chest" Sheet [#d3a40460] ''We’ll set conditions so that the chest only opens if the player has the Golden Key.'' ''1) In the Stamp Palette, select the “Treasure Chest (Get Item)” template and place it somewhere slightly away from the old man.'' When the event template opens, click the “Item to be Obtained” field and select the “Spirit Orb,” then convert the template into a custom event. #ref(./Creating an Event 2_11.jpg,40%) #br ''2) Once the Event Editor opens, in the “Check the Treasure Chest” sheet, go to the “Sheet Conditions” section, click the Add button, and select “Items.”'' Click the item field and choose “Golden Key” from the Asset Picker. Leave all other settings unchanged. #ref(./Creating an Event 2_12.jpg,40%) #br ''Once you've done this, try a test play.'' First, ''move the starting point closer to the cliff'', and then try a test play. You'll notice that the treasure chest is not appearing. #ref(./Creating an Event 2_13.jpg,40%) #br ''This happens because neither of the two sheets within the chest event has its conditions met, so the event doesn’t run, and nothing is displayed.'' ***"No Key" Sheet [#le850985] ''To display the chest even when the player does not have the Golden Key, we’ll add a new event sheet.'' Double-click the chest to open the Event Editor. ''1) In the Sheet List, select the “Check the Treasure Chest” sheet, then click the Add button to create a new sheet.'' Rename the new sheet that appears above “Inspect Chest” to “No Key.” Drag the “No Key” sheet below the “Check the Treasure Chest” sheet in the list. This sheet won’t have any conditions, so if it’s placed above “Check the Treasure Chest,” that sheet will never execute. Your “No Key” sheet should now look like this: #ref(./Creating an Event 2_14.jpg,40%) #br ''Try running a test play now.'' The chest should now be visible even before talking to the old man. The chest should now be visible even before talking to the old man. ''Sheets like this—used to show graphics when no other sheet conditions'' are met—are commonly used, so be sure to remember this technique. #br ---- ''The old man and treasure chest events are now complete.'' ''On the next page, we’ll set up the mechanism that allows the player to cross to the other side of the cliff after accepting the old man's request.'' ---- ''&size(16){Next: [[Creating an Event 3:https://rpgbakin.com/pukiwiki_en/?Creating+an+Event+3+%28Beginner+Tutorial%29]]};'' ''&size(16){Previous: [[Creating an Event 1:https://rpgbakin.com/pukiwiki_en/?Creating+an+Event+1+%28Beginner+Tutorial%29]]};'' ---- ''[[Beginner Tutorial INDEX:https://rpgbakin.com/pukiwiki_en/?RPG+Developer+Bakin+Beginner+Tutorial]]>>''