Author Topic: New rain script  (Read 271 times)

Diarandor

  • Hero Member
  • *****
  • Posts: 805
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: New rain script
« Reply #15 on: November 18, 2017, 05:02:02 pm »
It is much better now, this is awesome, thanks for this awesome script !

You are welcome! ;D
And here goes the first version of the hail script:
https://youtu.be/H1M4t04eQ78

Diarandor

  • Hero Member
  • *****
  • Posts: 805
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: New rain script
« Reply #16 on: November 18, 2017, 09:38:22 pm »
The fog script, and maybe other weather scripts, will have to wait. :P
No more weather scripts for now.

froggy77

  • Jr. Member
  • **
  • Posts: 92
    • View Profile
Re: New rain script
« Reply #17 on: November 19, 2017, 12:06:08 am »
wow, amazing what Solarus engine can do!

Your scripts are awesome, very well commented and quite easy to change to create new effects, that's why I follow your GitHub.

So, I created a fall (autumn) effect with orange leaves from your "snow manager" script. The "fall manager" is a first version, but I like the result.



(I specify the location of files to help newbies. ;)
  • Add these lines in ..\solarus\data\scripts\weather\weather_manager.lua
Code: [Select]
local fall_script_enabled = true
...

Code: [Select]
if fall_script_enabled then
  require("scripts/weather/fall_manager")
else -- Redefine methods to avoid errors.
  function game_meta:get_fall_mode() return nil end
  function game_meta:set_fall_mode(fall_mode) end
  function game_meta:get_world_fall_mode(world) return nil end
  function game_meta:set_world_fall_mode(world, fall_mode) end
end

You can find it here: https://github.com/solarus-games/children-of-solarus/blob/master/data/scripts/weather/weather_manager.lua

  • ..\solarus\data\project_db.dat  (Change it via the editor)
Code: [Select]
sprite{ id = "weather/leaf", description = "weather/leaf" }
  • Don't forget ..\solarus\data\scripts\meta\teletransporter_meta.lua
You can find it here: https://github.com/solarus-games/children-of-solarus/blob/master/data/scripts/meta/teletransporter_meta.lua
  • Also ..\solarus\data\script\multi_events.lua
You can find it here: https://github.com/solarus-games/children-of-solarus/blob/master/data/scripts/multi_events.lua

  • In ..\solarus\data\script\features.lua, add this line:
Code: [Select]
require("scripts/weather/weather_manager")You can find it here: https://github.com/solarus-games/children-of-solarus/blob/master/data/scripts/features.lua
You may need to delete some lines depending on your project, but you must add at least the line. I say that, because myself, I searched to find out why the weather scripts did not work.
  • In your "map".lua, add this line to trigger the effect in the "function map:on_started()"
Code: [Select]
game:set_world_fall_mode("outside", "fall") or "fall_storm" mode instead of "fall" mode.



Note that the current version of the snow manager is already far superior to the one of RPGshit RPGmaker.
lol  ;D
« Last Edit: November 19, 2017, 01:22:44 am by froggy77 »