gfxgfx
 
Please login or register.

Login with username, password and session length
 
gfx gfx
gfxgfx
 
Members, please note that our guidelines are located here.
 
gfx gfx
gfx
484586 Posts in 28410 Topics by 2464 Members - Latest Member: austinrobert July 11, 2020, 06:34:26 PM
*
gfx* Home | Help | Calendar | Login | Register | gfx
gfx
The Gaming Universe  |  The Archives  |  Archived Projects  |  Open Zelda  |  OZ Help (Moderator: red_team316)  |  Weather and Darkness
gfx
gfxgfx
 

Author Topic: Weather and Darkness  (Read 975 times)

Offline daiches99

  • Learner
  • *
  • Posts: 2
    • View Profile
Weather and Darkness
« on: July 18, 2010, 04:12:29 AM »
How do you change the weather and the darkness in the game?
I tried the scripts on the wiki but it 'couldn't tell what setting the darkness and change weather are'.

I want to do rain and thunder alongside with the rain scene music and inside a cave;
I want to lower the darkness level slightly and;
Almost in darkness (when you use the lantern to light up the cave.)

Offline Khatuni

  • Executive
  • ***
  • Posts: 1,007
    • View Profile
Weather and Darkness
« Reply #1 on: July 18, 2010, 12:16:52 PM »
For darkness, use this command:
DrawRectangle(0, 0, 640, 480, 0, 0, 0, 255)

Change the last value (min. 0, max. 255) with a timer script to give the screen a fading effect (day/night). You can also change the 3 consecutive 0s to change the colour. Try assigning a yellowish colour to simulate sunshine.

For rain and thunder, you can copy those sprites from LttP's rom in Snes9x (make sure you use the pause and frame skip hotkeys to simulate it accurately).

Offline Aliem

  • Ț̼͍̩̹̥̞̩̖͝ ̺̰̟͝s̸҉̜̜̘̥̥̤̬͓͔̰͔̩ͅ ̴̡̭̪͍͇̕c̦̀̀͡ͅ&
  • Advisor
  • Messiah
  • *
  • Posts: 13,311
  • Oh hai Mark
    • View Profile
Re: Weather and Darkness
« Reply #2 on: July 18, 2010, 02:19:48 PM »
Or you can use the weatherlib's DrawRain and DrawDarkness functions.

Offline KingOfHumans

  • Messiah
  • ******
  • Posts: 17,866
    • View Profile
Re: Weather and Darkness
« Reply #3 on: July 18, 2010, 02:23:29 PM »
Uh, we have a _weatherlib file that handles all these effects.

Check your main script for your quest to see if this line exists.
CallFunction("_weatherlib",false,"Handle","Null");

If not add it in, just don't place it in the FirstRun() area.

Now to change the weather just use this script in any screen.
CallFunction("_weatherlib",false,"SetWeather","n",1 or 2);
Use a 1 to create rain, use a 2 to create fog.

CallFunction("_weatherlib",false,"IsInside","n",true or false);
Use this to tell the game if your inside or not. This will change in the future where you can just check the box.

CallFunction("_weatherlib",false,"SetDarknessLevel","n",0 to 4);
If your inside you can use this to change the darkness. 0 means there is no darkness.

There will be more weather options in the future.



Offline daiches99

  • Learner
  • *
  • Posts: 2
    • View Profile
Re: Weather and Darkness
« Reply #4 on: July 18, 2010, 05:17:27 PM »
Just don't place it in the FirstRun() area.

This explains it.

Thank You

Offline KingOfHumans

  • Messiah
  • ******
  • Posts: 17,866
    • View Profile
Re: Weather and Darkness
« Reply #5 on: July 19, 2010, 08:21:07 PM »
The other CallFunctions can be placed inside of the FirstRun()

Sometimes it's best to open the file, look over it to learn about it to figure out where it can be placed.
Or use trial an error methods but might take longer to figure out.

The Gaming Universe  |  The Archives  |  Archived Projects  |  Open Zelda  |  OZ Help (Moderator: red_team316)  |  Weather and Darkness
 

gfxgfx
gfx
SMF 2.0.17 | SMF © 2019, Simple Machines Page created in 0.093 seconds with 21 queries.
Helios Multi © Bloc
gfx
Powered by MySQL Powered by PHP Valid XHTML 1.0! Valid CSS!
anything