Author Topic: Weather script help.  (Read 60 times)

Thatrias

  • Newbie
  • *
  • Posts: 2
    • View Profile
Weather script help.
« on: April 14, 2019, 08:58:16 pm »
 Hello everyone! I am working with the weather script and I put game:set_world_snow_mode("outside_world", "snow") into the map lua to test it. The snow works but the issue I m having is stopping it. I erased the game:set_world_snow_mode("outside_world", "snow") from the map lua but it is still snowing. How do I turn it off?

Diarandor

  • Hero Member
  • *****
  • Posts: 1042
  • Cats are cool! (ΦωΦ)
    • View Profile
Re: Weather script help.
« Reply #1 on: April 15, 2019, 01:48:47 am »
This comment was written in the above part of my script:
Code: [Select]
-- Snow manager script.
-- Author: Diarandor (Solarus Team).
-- License: GPL v3-or-later.
-- Donations: solarus-games.org, diarandor at gmail dot com.

--[[   Instructions:
To add this script to your game, call from game_manager script:
    require("scripts/weather/snow_manager")
The functions here defined are:
    game:get_snow_mode()
    game:set_snow_mode(snow_mode)
    game:get_world_snow_mode(world)
    game:set_world_snow_mode(world, snow_mode)
snow modes: "snow", "snowstorm", nil (no snow).
Warning: all events registered below with the syntax of the multi_events script
need to be "registered" in the same way in other scripts, if defined, to avoid overriding
previous code. Otherwise, you will get errors and the script will not work as it should.
--]]
I hope that answers your question.
« Last Edit: April 15, 2019, 01:51:08 am by Diarandor »
“If you make people think they're thinking, they'll love you. But if you really make them think, they'll hate you.”

Thatrias

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Weather script help.
« Reply #2 on: April 15, 2019, 10:26:09 pm »
Thank you so much it worked.