Multi Layer Fog 1.0
Shaz
Introduction
This script allows you to add multiple fog layers to your map and control the appearance and behaviour of them individually.
Features
- Show fog between the parallax background and the map
- Show fog above the map
- Set different fog layers to scroll in different directions and at different speeds
- Change fog tone over time
- Change fog opacity over time
- Choose whether fog is cleared when going to a new map
- Choose whether fog on a map carries through to battle screens
How to Use
Installation
Paste into a new script slot below Materials.
Customization
BATTLE_FOGS - set to true to show fog on battle screens (default), or false to show fog only on the map
CLEAR_ON_TRANSFER - set to true to remove all fog when changing maps (default), or false to keep fog until removed manually (false will make fog behave like pictures)
Using Fog
The following commands are all made via Call Script event commands.
Code:
- show_fog(id, "filename", hue, opacity, blend_type, zoom, speed_x, speed_y, z)
复制代码
will add the fog to the map. id is an array index (like picture numbers), and is used to further control fog with other commands.
Only id and filename are mandatory.
z, if used, should be greater than -100 and less than 0 to display fog between the parallax background and the map. If not used, fog will be shown above characters; fogs with a higher id will be shown above those with a lower id.
Code:
- tint_fog(id, red, green, blue, gray, duration)
复制代码
will change the tint/tone of the fog over the duration (in frames)
Code:
- fade_fog(id, opacity, duration)
复制代码
will change the opacity of the fog over the duration (in frames)
Code:
will remove the fog with that id
Script
Get it here
Version 2 here (to address the 'fog sticks to player' issue)
Credit and Thanks
- credit Shaz
Author's Notes
Free for use in commercial games. Give credit.
Updates
2021.02.27 - added fix to both versions for blend type, where fog on new map would have same blend type as fog on old map. Thanks to BrokenAnkle21 for this fix.
本贴来自国际rpgmaker官方论坛作者:Shaz处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:
https://forums.rpgmakerweb.com/threads/multi-layer-fog.18835/