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

[制作教程] How to set weather for a single map only

[复制链接]
累计送礼:
0 个
累计收礼:
1 个
  • TA的每日心情
    慵懒
    3 天前
  • 签到天数: 207 天

    连续签到: 1 天

    [LV.7]常住居民III

    3646

    主题

    862

    回帖

    2万

    积分

    管理员

    Rank: 9Rank: 9Rank: 9

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

    灌水之王

    发表于 前天 15:54 | 显示全部楼层 |阅读模式
    In the last few months, several people had problems handling the "set weather effect" event command - So I decided to make a very quick tutorial on how to best make such an effect and what to consider here (especially due to some less than optimal translations even in the english version of the editors).


    Basically you need one event to start the weather on a map.
    The simplest and easiest way is to do it like displayed in the following picture:



    1) parallel processes are executed before autoruns, that is why it should be a parallel process if it is already raining on the map
    2) priority should be above player to make sure it doesn't interfere in any way
    3) in the set weather effect command, the duration should be set to 1

    This is what I meant with the "less than optimal translation" - the duration value is not the duration of the weather effect, but how long the change between previous weather and next weather should be. If you set it to for example 360, then the map will start without weather and during the first six seconds the rain will slowly start before it gets to the set strength afer the 360 frames. If you want it already raining on entry to the map, you need to set the duration to 1

    4) place an "erase event" after the set weather effect

    Erase event erases this event from memory, but not from the mapfile. If the player leaves the map and returns later, it will be there again and start the rain for this map again.

    And this is all you need to start a simple rain on a map.

    Now we need to stop the rain when leaving the map, because otherwise it would continue raining on the next map (which is bad if it is an interior map, it doesn't rain in houses or caves).


    ATTENTION:
    Some people try to place the commands for this on the next map. Simply DON'T.
    You should always stop the weather effect on the same map you started it, because game development takes months or years, with ever changing maps - if you change it on the next maps, you might forget to change it when adding maps or moving their transfers around.
    If it rains again on the next map, then start the rain again there - complex checks should be handled differently to preserve your sanity during bughunting.

    So if you need to stop the weather on transfer to another map, the easiest way is to edit the transfer events.
    Most people use the automated quick event: transfer, so that is what I did as well with the next picture:




    1) right-click on the map and create your transfer events as usual
    2) after the quick event has been placed, doubleclick it to open it
    3) doubleclick on the line with the transfer command, that will open the event command window to insert a new command directly above the transfer
    4) select the "set weather effect" command, set it to none and the duration to 1 (again, you don't want the player to watch the rain slowly drying before the transfer so the duration should be as short as possible)
    5) confirm with OK

    finished, repeat whenever you make another transfer to a different map


    That is all you need to have it rain on a single map and stop the rain for the next maps, whatever they are.



    Advanced options:
    If you don't want it to always rain on the map, or if you want to have different weather options, you need to place additional coding into the event for starting the weather - and only there.
    If you want to have different weather options, the easiest way would be to store the current weather as a number into a variable, and have a series of conditional branches for each possible number, with different set weather effect commands in those branches. Don't use else, only check for equal and make sure that the number for each different settings is always the same on all maps.
    That number might be set or randomized or whatever based on your game.

    For an extremely complex weather system I suggest placing the commands for all checks and all effects into a single common event (trigger = none) that is called by the event above instead of the simple set weather effect command.
    That is because you need the effect of the erase event command (and you can't erase common events), but on the other side you want only one place to handle the code for your weather, especially if it is complex or if you slowly add more conditions to the system.


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

    本帖子中包含更多资源

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

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

    使用道具 举报

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

    本版积分规则

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

    幸运抽奖

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

    立即查看

    聊天机器人
    Loading...

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

    GMT+8, 2026-7-10 02:07 , Processed in 0.112828 second(s), 52 queries .

    Powered by Discuz! X3.4

    Copyright © 2001-2020, Tencent Cloud.

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