RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
AG- Day and Night system

0 Members and 1 Guest are viewing this topic.

***
Rep:
Level 88
Professional Chocobo Hunter
This is incredibly easy. I dont see why everyone keeps asking for a script.

Step 1: Create a Common Event for your time triggers.
Step 2: Create a switch that will activate the common event. (Ex: Switch 001: Daynight)
-----------------------------------------------------------------------

First create an event in the map where the game starts. Set it to Auto Start then put the following events in:

Switch Operation: 001: Daynight is ON
Erase Event

Now that that is done, go into the common event and enter the following:

[Loop]
Tint screen: -87, -87, -87, transition frames: 40
Wait: 999 frames.
Tint Screen: 0, 0, 0, transition frames: 40
[End Loop]


Your first command will be to loop the event over and over so that it continues through your game.

Your second command is going to be to tint the screen. Take all the colors down to -87ish. That will be sufficient for night.

Your third command will be to wait 999 frames. This is plenty of time for day and for night.

Your fourth command will be to tint the screen again. Take all colors back to 0 each. This will return the tint to the normal screen brightness.

----------------------------------------------------------------------------------

If you want certain events to happen during day or night, then you do this:


[Loop]
Trigger Operation: 002: Daylight is OFF
Tint screen: -87, -87, -87, transition frames: 40
Trigger Operation: 002: Nighttime is ON
Wait: 999 frames.
Trigger Operation: 002: Daylight is ON
Tint Screen: 0, 0, 0, transition frames: 40
Trigger Operation: 002: Nighttime is OFF
[End Loop]


This way, you can set certain events to only be active when the nighttime or daytime switches are active, therefore allowing you to make events corresponding to day and night.

This also works if you want to create a werewolf system for your character. (*hint hint*)

Crystal Collection - On hold.

FF:Dark Symphony - 12%
Demo: May 10th, 2007

**
Rep:
Level 88
The Smexy Babe Magnet
Looks awesome! I'm definetly going to try this out.  ;D


Got no good story ideas? Try using Seventh Sanctum. It's got millions of generators for things you might need.

***
Rep:
Level 88
Professional Chocobo Hunter
Sorry, one thing I forgot to mention:

If you want day or night to last longer, just add more wait commands. 999 is the limit per command, but you can add as many 999 (or whatever value you need) as you want until you get it to the length you want.
Crystal Collection - On hold.

FF:Dark Symphony - 12%
Demo: May 10th, 2007

**
Rep:
Level 88
The Smexy Babe Magnet
I kind of figured that was the case...

Anyways, this seems a whole lot easier than the scripts I've seen. Again, good job!  ;D


Got no good story ideas? Try using Seventh Sanctum. It's got millions of generators for things you might need.

**
Rep:
Level 88
I'm scared of my grandma. Wouldn't you be?
There's no doubt that this is a good tutorial, but I think you should describe how to do certain events at set times. I'm eager to hear some of your ideas. And don't you think the events add too much lag to your game?

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
It's a nice idea, but the event code for your DNS is ruggish.

Code: [Select]
[Loop]
Trigger Operation: 002: Daylight is OFF
Common Event: Wolf
Tint screen: -87, -87, -87, transition frames: 40
Trigger Operation: 002: Nighttime is ON
Wait: 999 frames.
Trigger Operation: 002: Daylight is ON
Common Event: Human
Tint Screen: 0, 0, 0, transition frames: 40
Trigger Operation: 002: Nighttime is OFF
[End Loop]

If I wait 990 frames and change the map the counter will go from the beginning again. Sorry, but I don't think this is a good tutorial, because it's not sophisticated.

@J-Crew: My DDNS was once common-event-based. It had like 10 times more commands and that in 3 different common events (so 30 times more event code) and it didn't lag. Right now I have quite a few common events and quite some scripts working during the map scene and I don't have lag. Of course I am also using an Event-Anti-Lag System.
« Last Edit: December 12, 2006, 01:41:29 PM by Blizzard »
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!

***
Rep:
Level 88
Professional Chocobo Hunter
If I wait 990 frames and change the map the counter will go from the beginning again. Sorry, but I don't think this is a good tutorial, because it's not sophisticated.

Your absolutely right. I never really counted like that. When your playing the game, you won't really notice, but I guess since we are all game designers, it sticks out pretty bad.

Thanks for pointing that out.
Crystal Collection - On hold.

FF:Dark Symphony - 12%
Demo: May 10th, 2007

********
EXA
Rep:
Level 92
Pikachu on a toilet
Project of the Month winner for April 2007
No problem. We're all here to help each other. :)
Get King of Booze for Android, for iOS, for OUYA or for Windows!
Visit our website.
You can also love/hate us on Facebook or the game itself.


Get DropBox, the best free file syncing service there is!