#author("2026-06-18T08:41:40+09:00","default:admin","admin") #author("2026-06-18T08:53:51+09:00","default:admin","admin") ''[[Beginner Tutorial INDEX:https://rpgbakin.com/pukiwiki_en/?RPG+Developer+Bakin+Beginner+Tutorial]]>>'' *Event Battle [#l13da227] ''We're finally nearing the end of this tutorial.'' ''As a final step, let's create an event battle that triggers when the player approaches the boss at the back of the hall.'' **Placing the Boss [#ba025eef] ''Place the boss in the hall area of the “Boss map”.'' In this case, the boss will be placed as an “object,” and you'll place an event in front of the boss to trigger the boss battle. From the [[Stamps Palette]] under the Objects tab > 2D Casts > Monster Casts, select a monster of your choice and place it on the map. For this example, we've placed “BOSS_Wizard_A.” #ref(./Event Battle_1.jpg,40%) #br ***Creating a Boss Battle Map [#t66b37dd] ''Now, let's create a new map "BossBattleMap" specifically for the boss battle.'' Design the terrain and objects so they don’t interfere with the battle camera. Try to match the atmosphere of the “Boss Room” map, and consider adding lights to prevent the scene from becoming too dark. Here’s a sample battle map we've created for reference: #ref(./Event Battle_2.jpg,40%) #br **Event Battle [#q2baf64f] ''Let’s place the boss battle event in the corridor between the map entrance and the boss chamber.'' Click on the terrain and press G to open the Event Editor, then apply the following settings: #ref(./Event Battle_3.jpg,40%) #br ''Event Name: Boss Battle'' Event Sheet Name: Boss Battle Collision Range: Expand the range to cover the width of the corridor. Event Trigger: ''When Player Makes Contact with Event'' From the Command Selector, go to the Conditional Judgment category and add the Execute Battle and Check Results panel. In the panel settings: Check the box for Inescapable and set the BGM to any music you like. For the monster, choose the same boss you placed earlier (in this example, “BOSS_Wizard_A”) #ref(./Event Battle_4.jpg,40%) #br ''Click the Placement button to select the battle map and define where on that map the battle will take place.'' Select the “BossBattleMap” you just created, and adjust the battle position. Please press the “Battle Test” button to check that the battle scene is working properly. #ref(./Event Battle_5.jpg,40%) #br ''The Execute Battle and Check Results panel allows branching based on the battle result.'' Under the "When Won" branch, add a panel from the Screen Effects category > Display Title Screen. #ref(./Event Battle_6.jpg,40%) #br ''Try a test play. (You can adjust the starting point or use the debug window to speed up testing.)'' In the “Boss map”, if the player defeats the boss, they will return to the title screen. If they lose, it will be a game over. If you feel the post-battle scene is too bland, consider enhancing it by changing the BGM, displaying a message, or fading out the screen. ***Retry Feature [#x13c5140] ''Let’s add a feature so that when the player loses to the boss, they restart from the entrance of the “Boss Room” map instead of getting a game over.'' ''Open the Boss Battle event and, at the top of the event, add a panel from the Screen Effects category > Specify Game Over.'' When the panel opens: Check Advanced Settings and click Edit Settings. Turn on "Move", then click on the entrance area of the map above to set the restart position. Set HP on Revival to 100% If you want to restore MP as well, click the Add button under the “Consumption Status” section and set the desired recovery percentage #ref(./Event Battle_8.jpg,40%) #br ''Now, when testing the game, the player will be able to restart from the map entrance even after losing to the boss.'' ''Note:'' '''In the sample game Orb Stories, the event “Last Battle” in the “Shrine of the Orb” map handles retries after losing in a different way.''' '''Feel free to check it out as a reference.''' **Changing Player Status [#e7cb2d4a] ''"With the current data, the player cast’s status is too weak to defeat the boss.'' ''So, let’s try changing status values like HP and attack power in the database."'' ''Go to Database > Casts and select “HERO.”'' Change the maximum HP and attack power. Click the ''“Equipment and Abilities”'' tab, then click the ‘Add’ button in the “Skills to be Learned” section. Try adding your favorite skills. The “Assassin Blade” skill has been configured as a debugging skill to deal particularly high damage. #ref(./Event Battle_9.jpg,40%) #br **Cross-Save Variables [#y4c7d13a] ''Finally, let’s add a mechanism that enables “post-clear gameplay.”'' ''In the “Boss Battle” event, before the “Display Title Screen” branch under the “When Won” condition, please add the “Switches” category > “Turn Event Switch ON/OFF” panel.'' Click the Event Switch Number field, and in the dialog that appears, go to the Cross-Save Variables tab. Click the Add button to create a new variable. Rename “Crosssave0” to GameClear.'' #ref(./Event Battle_10.jpg,40%) #br During a test play, open the [[Debug Window]] > Variable Monitor, and keep an eye on the “GameClear” variable. After defeating the boss, confirm that the GameClear variable is set to “1” and stays at “1” even after returning to the title screen. ''In Bakin, all event switches and regular variables are reset when the game is cleared. However, Cross-Save Variables retain their values across playthroughs.'' This allows you to create branching paths or events such as: “If the GameClear variable is 1, then run this event.” In other words, you can design new developments specifically for post-clear gameplay. We won’t use this feature further in this tutorial, but try using what you’ve learned to make changes for a second playthrough. ''Note:'' '''In the sample game Orb Stories, the title screen changes after clearing the game, using a Cross-Save Variable.''' **Setting the Starting Point [#z44b6c4d] ''Now that the boss battle is complete, let's set the game's starting point to the front of the house in “Map_1”.'' Once you've done that, try playing through the game from the beginning. ---- ''&size(16){Now the basic structure of your game is complete.};'' ''You can keep expanding it by adding new events, adjusting enemy or player stats.'' ''Or even creating a party system so the player adventures with companions.'' ''{With Ctrl+Z and [[backup files:https://rpgbakin.com/pukiwiki_en/?When+Problems+Occur#ebbf43ac]], you can always undo changes.'' ''&size(20){Try using Bakin’s many features to bring your world to life as a game.};'' ---- //''&size(16){Next: [[Creating a Map 2:https://rpgbakin.com/pukiwiki_en/?Creating+a+Map+2+%28Beginner+Tutorial%29]]};'' ''&size(16){Previous: [[Switching the Camera:https://rpgbakin.com/pukiwiki_en/?Switching+the+Camera+%28Beginner+Tutorial%29]]};'' ---- ''[[Beginner Tutorial INDEX:https://rpgbakin.com/pukiwiki_en/?RPG+Developer+Bakin+Beginner+Tutorial]]>>''