- 3
- Posts
- 15
- Years
- Seen Jun 5, 2009
Night and Day 2
Thank you, DragoChamp. I completely understand the logic of all of that, but my game does not want to cooperate. There is a backyard that the interior of the character's home leads to, and I wanted to change the color of the backyard. So I first set an event, without character graphic, on some random place on the ground. I wanted it to be about 7:00 PM, so I set the color tone to -36,-75,-13,0. Then I used the "Control Self Switch" command and set A to on. Next, I created a new event page on that same event and checked the box beneath the "Conditions," that was "Self-Switch A is On." I set both event pages to Autorun, also. Did I do something wrong? Whenever I walk from the house to the backyard, my game freezes up. It does not even show the character; the entire screen goes black and stays that way. I'm pretty sure 7:00 PM isn't that dark. Haha. But I've noticed this: whenever I set up an invisible event in my game, and my player enters the map, the game freezes. What am I doing wrong? For this situation, should I simply pin all of the tone-changing attributes to something visible, like a bush? Thank you.
You know, I actually found out my problem, and everything seems to be running smoothly. Thank you very much for everything, DragoChamp. I do have another question, however. Having set the color tone of the backyard, it will stay that way no matter what, right? Even when Pokemon Essentials is checking my computer's time? Also, let's say that the character gets the items for his father at town slightly north of his own, returns to town, and delivers the goods to his father. How would I go about setting a switch for the backyard to stop being dark, and begin to run in accordance with the time on my computer? I know I could set a switch after the father says something like, "Thank you for the goods, \pn!" and then make a new event page on the tone-changing event in the backyard that checks the switch and causes time to run normally. But can anyone walk me through the process? My mind is very muddled about this.
Thank you, Wichu. My only problem is that I wouldn't know where or how to enter that script. I'm very script-inept at the present, but I am learning. Is there a way to do this without the script, or is there a way to make a hybrid of built-in commands and script? Even if there isn't the latter and former, I would greatly appreciate if you could walk me through the process of entering the script you have given me. Even though I am inept, thank you for your reply.
The day and night system is a script that tints the screen according to the time of the day. So with this in mind you can go about solving your problems. Check under the first line in PokemonUtilities for the colour of the screen during your desired time (for example: 5 o'clock in the morning would be the 5th line in the module PBDayNight, so the colour there is -119,-96.3,-45.3,45.3). Now on your map that you want it to stay this colour forever you could set up a simple event that calls up the "Change Screen Color Tone" and set the values according to the line in the code (so it would be RED=-119, GREEN=-96.3, BLUE=-45.3 and GRAY=45.3). Now set the event to Autorun, and after the "Change Screen Color Tone" command click "Control Self Switch" and select A to be on. Now make a new event page and check the box that says "Control Self Switch" and select A. This makes the map you want to change color. Now you have to go to the map that is joined with your map that changes colour tone, and copy the event you made. But this time for the colours set all to 0, so when you leave the map with the changed color, the map color changes to its normal one again.
For the clock part, Pokemon Essentials checks the time on your computer and operates with that value. It uses the code "Time.now.hour" and i guess you could just put a "=" sign afterwards to manipulate the time that the game engine thinks it is.
Thank you, DragoChamp. I completely understand the logic of all of that, but my game does not want to cooperate. There is a backyard that the interior of the character's home leads to, and I wanted to change the color of the backyard. So I first set an event, without character graphic, on some random place on the ground. I wanted it to be about 7:00 PM, so I set the color tone to -36,-75,-13,0. Then I used the "Control Self Switch" command and set A to on. Next, I created a new event page on that same event and checked the box beneath the "Conditions," that was "Self-Switch A is On." I set both event pages to Autorun, also. Did I do something wrong? Whenever I walk from the house to the backyard, my game freezes up. It does not even show the character; the entire screen goes black and stays that way. I'm pretty sure 7:00 PM isn't that dark. Haha. But I've noticed this: whenever I set up an invisible event in my game, and my player enters the map, the game freezes. What am I doing wrong? For this situation, should I simply pin all of the tone-changing attributes to something visible, like a bush? Thank you.
You know, I actually found out my problem, and everything seems to be running smoothly. Thank you very much for everything, DragoChamp. I do have another question, however. Having set the color tone of the backyard, it will stay that way no matter what, right? Even when Pokemon Essentials is checking my computer's time? Also, let's say that the character gets the items for his father at town slightly north of his own, returns to town, and delivers the goods to his father. How would I go about setting a switch for the backyard to stop being dark, and begin to run in accordance with the time on my computer? I know I could set a switch after the father says something like, "Thank you for the goods, \pn!" and then make a new event page on the tone-changing event in the backyard that checks the switch and causes time to run normally. But can anyone walk me through the process? My mind is very muddled about this.
Here's a small script I wrote for somebody else. It will allow you to set the time to something else while a certain switch is on.
In this case, if switch 1 is on, the time will be set to midnight on the current day. Change the switch ID and values in the brackets to suit what you need. You can also expand it using elsif statements if needed.Code:class Time def self.now ret=self.new if $game_switches[1] return self.local(ret.year,ret.month,ret.day,0,0) # Year, month, day, hour, minute end return ret end end
Thank you, Wichu. My only problem is that I wouldn't know where or how to enter that script. I'm very script-inept at the present, but I am learning. Is there a way to do this without the script, or is there a way to make a hybrid of built-in commands and script? Even if there isn't the latter and former, I would greatly appreciate if you could walk me through the process of entering the script you have given me. Even though I am inept, thank you for your reply.
Last edited: