设为首页收藏本站同能贴吧 切换语言 繁体中文
开启辅助访问 切换到窄版
扫描二维码关注官方公众号
返回列表
+ 发新帖
查看: 56|回复: 0

[制作教程] Eventing a Dynamic Map Selection

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    开心
    前天 04:10
  • 签到天数: 209 天

    连续签到: 2 天

    [LV.7]常住居民III

    4454

    主题

    864

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

    VIP
    7
    卡币
    22915
    OK点
    16
    推广点
    0
    同能卷
    50
    积分
    28263

    灌水之王

    发表于 3 天前 | 显示全部楼层 |阅读模式
    This tutorial will teach you how to create a "quick travel" or "teleport" scene purely using events. The locations the player is able to quick travel to only become available once they discover them, and are listed in the order they are discovered. This tutorial was created as part of the RMDev Challenge #1.

    A demo can be downloaded here (RTP not included). 

    The final result should look something like this:




    (note that the layout is completely customisable! Import your own pictures to give it a personalised appearance!)


    Pressing Q and W scrolls through discovered towns, and selecting the highlighted town teleports the player to that location. This tutorial is split into multiple sections which all work together. An event is required in each town, as well as one at the teleporter, and three common events are required. Also, you will require a basic understanding of switches and variables to understand this tutorial.

    So, without further ado, let's get into it!

      Town Events:

    This event will run as soon as the player enters a town and will record that the player has entered the town (note that town events in the demo are located in the upper-left hand corner of each town). For example, let's say the player enters town A; the event should look like this:


    Spoiler








    Now, straight away, we see some switches and variables that need to be defined.

    X (variable) is used to keep track of how many towns the player has discovered. Each time the player discovers a new location, it should be increased by one.

    Town A (variable) is used to show in what order Town A was discovered. Every town requires a variable such as this. By setting this value to the game can determine how many locations the player had visited before visiting Town A (Hence, it is important to increase by 1, only after setting the town's variable to X.

    Discovered A (switch) records that Town A has been discovered. Every town requires a switch such as this.

    This first page should be set to Autorun, with a second, blank, page activating after switch Discovered A is on.

      Teleporter Event

    This is the event that activated the location selection. It may look daunting at first, but is actually quite simple:


    Spoiler








     ​

    The first thing the event does is check to see if any towns have been discovered. As is the number of towns that have been discovered, if equals 0, then no towns have been discovered. A simple message is displayed to signify this. The Map Selection variable will be discussed later.

    However, if a town is discovered, the event sets up for some common events (which will be explained later). However, the biggest task this event carries out is setting up the names of the towns that have been discovered. See in the first screenshot how there are town names on the left hand side? This event is what displays them. Each town's name is a picture which is displayed. The X coordinate for each picture is 5, and the Y coordinate is calculated based on the order they are discovered. This allows the names to be listed in the order they are discovered.

    The exact Y and X coordinates are completely optional. To calculate the Y coordinate, I incorporated the town's variable in the calculation. If a town is discovered second, it's variable would equal 1, if it was discovered fifth, it would equal 4, etc. hence, by multiplying the town's name's picture's Y coordinate by its respective variable, it will be displayed further down the screen than subsequent towns.

    The final thing this event does is activate the common event: Select Map Location.

      Select Map Location Common Event

    This is event determines which location is currently highlighted:


    Spoiler








    The first thing this event does is disable the player's access to the menu. As this is kind of creating a new menu, it would be weird for the player to be able to access the pause menu as well. Also, it makes the B button available (which is the default "exit menu" button). At the end of the event, it can be seen that the player can escape the location selection scene by pressing the B button, and the button's normal function is then restored.

    I believe my comments explain the rest event in adequate detail. Basically, the event gives the function to the Q and W buttons to scroll through available locations. The MapBackground picture is the black and brown circle in the first screenshot (excluding the map on it, that is a separate picture).

    Map Selection (variable) was mentioned earlier on.This variable is used by the common event: Show Map Location. It is initially at 0 (as shown in the Teleporter event). It increases by 1 every time W is pressed and decreases by 1 each time Q is pressed.

     Show Map Location Common Event

    This common event is called at the beginning of the Select Map Location common event. This event simple shows a picture based on Map Selection is currently equal to:


    Spoiler








     ​

    Now, this event may look large, but is actually just the exact same process repeated each time (once for each town). What the event does is, firstly, checks to see if a town has been discovered yet. If not, it moves on. If it has, then it checks to see if the town is currently highlighted by the Select Map Location common event.

    As mentioned before, each town is given a number when it is discovered. If this number is equal to the Map Selection variable, then it will be highlighted, otherwise it is un-highlighted. 

      Go To Map Location Common Event

    This common event activates if the player presses Z or Spacebar in the Map Selection scene and is the final step in the process. This event begins by stopping the Select Map Location common event and erases all of the pictures associated with the map selection:


    Spoiler








    Then once everything is "put away", it transfers the player to the location that is currently highlighted. Finally, normal use of the B button is restored so the player can once again access the pause menu.

    And so concludes this tutorial! You are now one step closer to eventing your own, sleek, quick travel system! Good Luck!

    A demo can be downloaded here (RTP not included). 


    本贴来自国际rpgmaker官方论坛作者:Petite Elite处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/eventing-a-dynamic-map-selection.34839/

    本帖子中包含更多资源

    您需要 登录 才可以下载或查看,没有账号?立即注册

    x
    天天去同能,天天有童年!
    回复 送礼论坛版权

    使用道具 举报

    文明发言,和谐互动
    文明发言,和谐互动
    高级模式
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    简体中文
    繁體中文
    English(英语)
    日本語(日语)
    Deutsch(德语)
    Русский язык(俄语)
    بالعربية(阿拉伯语)
    Türkçe(土耳其语)
    Português(葡萄牙语)
    ภาษาไทย(泰国语)
    한어(朝鲜语/韩语)
    Français(法语)
    关闭

    幸运抽奖

    社区每日抽奖来袭,快来试试你是欧皇还是非酋~

    立即查看

    聊天机器人
    Loading...

    QQ|Archiver|手机版|小黑屋|同能RPG制作大师 ( 沪ICP备12027754号-3 )

    GMT+8, 2026-7-14 15:36 , Processed in 0.093478 second(s), 55 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

    快速回复 返回顶部 返回列表