Zelaron Gaming Forum  
Stats Arcade Portal Forum FAQ Community Calendar Today's Posts Search
Go Back   Zelaron Gaming Forum > Zelaron Gaming > RPGMaker

 
 
Thread Tools Display Modes

 
Day/Night
Reply
Posted 2004-01-23, 10:12 AM
HI! I made a Day/night event that works fine for me but could someone please tell me how to halt it happening inside, But i still want it to be night if it was night when you entered, day if it was day when you entered etc. I attached a shot of the common event incase it helps. Yeah I did go back to using rm2k tho i still dont have a game in mind I have a few ideas.
Attached Images
File Type: bmp thevent.bmp (278.1 KB, 90 views)
"Try not! Do or do not, there is, no try!" Quote Yoda.

Last edited by 05thouldm; 2004-01-23 at 10:22 AM.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-23, 10:29 AM in reply to 05thouldm's post "Day/Night"
First thing's first - insert another Fork as the first line, with a switch being the condition (xxxx:TimeInEffect). Now, you'll need to move all of the other forks into that first fork statement. The best way to do that is to select the first statement you need to copy, hold shift, and then click the last line to copy (while still holding shift, obviously). That'll select everything so you can right-click + cut, then paste the lines into the fort statement.

On any "Outside" to "Inside" teleportation events, disable the xxxx:TimeInEffect switch. In any "Inside" to "Outside" events, enable that switch. Any event where you stay inside or outside, you won't need to add anything.

The screen will still be whatever color you have it set at, it'll still be "morning", etc - it'll just stop time from moving.

Edit: 
Ahh, you attached it. I forgot that branches are called forks in RM2k..

Last edited by BlueCube; 2004-01-23 at 10:36 AM. Reason: Ahh, you fixed the screenshot.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-01-23, 10:34 AM in reply to BlueCube's post starting "First thing's first - insert another..."
I think you have to wait a little while before it shows up. Takes a minute or two with me. I dont really understand your post so... Please could you wait a little while to see if it works? Thanks.
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-23, 10:49 AM in reply to 05thouldm's post starting "I think you have to wait a little while..."
Basically, if you want time to stop, disable the "TimeInEffect" switch. If you want time to go, enable "TimeInEffect".

The structure is something like it is below, with your forks instead of the comments..
Attached Images
File Type: jpg simple.JPG (8.2 KB, 88 views)
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-01-23, 10:57 AM in reply to BlueCube's post starting "Basically, if you want time to stop,..."
Ok I get that but my system has waits in it not timers, does that matter?
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Try this..
Reply
Posted 2004-01-23, 11:16 AM in reply to 05thouldm's post starting "Ok I get that but my system has waits..."
CODE HAS CHANGED AFTER A QUICK RUN-THROUGH IN MY HEAD.

After reviewing the code, I wonder if the "waits" will simply advance one time period and THEN stop. Not what you want.

It might be best to do something like this: (Pseudocode time!)

<>Branch: TimeInEffect is ON
...<>Add 1 to "0024:Hour" variable
...<>Branch: Hour = 6
......<>Branch: Hour = 11
.........<>Branch: Hour = 15
............<>Branch: Hour = 20
...............<>Branch: Hour = 24
..................<>Set Hour to 0
..................<>
...............:End
...............<>Set screen as Night
...............<>
............:End
............<>Set screen as Afternoon
............<>
.........:End
.........<>Set screen as Mid-Day
.........<>
......:End
......<>Set screen as Morning
......<>
...:End
...<>Wait x seconds
...<>
:End


It's color-coded so you can see where the branches are nested. Change the hours to whatever you feel are appropriate.

This one's based on a 24-hour model I once used... the bonus is, you can have events that are based on the hours of the day! So you can have, say, a door to a shop that's disabled when Hour > 18 (6pm) or Hour < 6 (6am) or something.

And, of course, a "watch" item might come in handy to tell the time. You'll just use it to call a common event, that only consists of this line:

<>Message: "The time is \v[24] o'clock."

Change the 24 to whatever your "Hour" variable number is.. if it's [0001:Hour] then you'd change it to 1, for example.

Last edited by BlueCube; 2004-01-23 at 11:43 AM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-01-23, 11:45 AM in reply to BlueCube's post "Try this.."
Ok Thanks!
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-24, 04:44 PM in reply to 05thouldm's post starting "Ok Thanks!"
I have go tthe time thing to work and all but what about houses? If I enter one at night it still is night indoors and if i set screen tone upon entering the house then if i leave its still day. (Entered at night screen changed to day left it was 21 hours and daytime) help please!
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-25, 12:44 PM in reply to 05thouldm's post starting "I have go tthe time thing to work and..."
You don't want the inside of houses to be dark as well? Okay then..

Change the parts where you set the screen tone to setting a "xxxx:TimeOfDay" variable (set it to 1 for morning, 2 for mid-day, 3 for afternoon, 4 for night)

(Changes are in red)

<>Branch: TimeInEffect is ON
...<>Add 1 to "0024:Hour" variable
...<>Branch: Hour = 6
......<>Branch: Hour = 11
.........<>Branch: Hour = 15
............<>Branch: Hour = 20
...............<>Branch: Hour = 24
..................<>Set Hour to 0
..................<>
...............:End
...............<>Set TimeOfDay = 4
...............<>
............:End
............<>Set TimeOfDay = 3
............<>
.........:End
.........<>Set TimeOfDay = 2
.........<>
......:End
......<>Set TimeOfDay = 1
......<>
...:End
...<>Branch: TimeOfDay = 1
......<>Set screen to morning
......<>
....:End
...<>Branch: TimeOfDay = 2
......<>Set screen to mid-day
......<>
....:End
...<>Branch: TimeOfDay = 3
......<>Set screen to afternoon
......<>
....:End
...<>Branch: TimeOfDay = 4
......<>Set screen to night
......<>
....:End

...<>Wait x seconds
...<>
:End

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

The logic is this:

Check if time is active
...Add 1 to hour
...Check if new hour changes the time of day - if so, set the TimeOfDay variable
...Set screen to whatever time of day it is
...Wait x seconds for hour to pass

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

Reactivating time will automatically set the screen to whatever time of day it is, after incrementing it one hour. Thus, a house effect is this:

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

(timer common event) -> Hour is 23, TimeOfDay = 4
(timer common event) -> Set screen to night (even if it's already night)
(timer common event) -> Wait x seconds for hour to finish
Deactivate time
Teleport inside house
(timer common event) -> Hour wait finishes, waiting to reactivate time for next hour

In house, do whatever

Telport outside
Activate time
(timer common event) -> Hour increases, 24
(timer common event) -> Hour set to 0
(timer common event) -> Screen change to night
(timer common event) -> Wait x seconds for next hour

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

Basically, going inside and spending more than an hour inside, will make you "lose" an hour when going outside. (If it's 4, and you spend 5 hours in there, the time when you leave will be 5, not 9 - since time's stopped based on the logic above.) However, the TimeOfDay will automatically reset the screen color when time is reactivated, if you spend more than an "hour" there. It actually resets the screen color every hour, even if the screen is correct, but you won't see the effect transitioning from dark to dark since they're the same color.

If you want, I can give you the code for having the time be constantly going and only changing the screen:
1) Every hour
2) On a direct command to update the screen

If you want THAT, that's no problem.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-01-27, 12:26 PM in reply to BlueCube's post starting "You don't want the inside of houses to..."
I tried that system and got it looking EXACTLY alike to your version. It doesnt frigging work! The first change worked but that was about it. The screen tone never changed again after the first and stayed the same even when the switch was turned off when entering a house. It got me really peed having to try and get it working for about 2 hours.
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-28, 12:27 PM in reply to 05thouldm's post starting "I tried that system and got it looking..."
I wasn't in a programmin' mood at that point. I made some HUGE logical errors there.. Sorry about that, 'twas one of those days. Today, after going through the code I gave you, I'm completely embarrassed about the stupidity of that code. Why I thought nesting was a good idea when it's dependant on being equal to something is beyond me. You can probably see the flaw right away when it's simplified..

Code:
if x = 4 then
   if x = 6 then
     print "wait, why does x=6 if x=4 going into the branch?"
   end if
end if

Oh well. Going to dig up my old day/night routine, screenshot it, and attach it.

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

Okay then, After a bit of thinking I've dug up my old day/night routine. 3 parts to it originally, but a quick test shows that a 4th routine might be useful.

These have already been tested, at least on RM2k3.. still, I think the 4th addition might be rather useful to you. Saves a bit of time coding, at least.

(Let's try.. this. These are the two "Call" events. Simply call them when appropriate. You want to call the "HouseTime" one when you are going into a house, and the "RestartTime" one when you leave. For some reason they're not attaching the right way.)

Attached Images
File Type: jpg time1.JPG (62.2 KB, 8 views)
File Type: jpg time2.JPG (46.3 KB, 5 views)

Last edited by BlueCube; 2004-01-28 at 12:56 PM.
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-01-28, 03:57 PM in reply to BlueCube's post starting "I wasn't in a programmin' mood at that..."
Ok I have the first two common events Day.night and Update time but In the screenshots there are 3 and whats this of a house event? I tried all four things (Two attachments worked fine but two links didnt) and I think im missing some.
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-28, 06:58 PM in reply to 05thouldm's post starting "Ok I have the first two common events..."
Yep. Those other 2 didn't attach. (Worked for me before, but it was probably cached.)

Going to attempt attaching them again.
Attached Images
File Type: jpg woot.JPG (47.2 KB, 7 views)
File Type: jpg woot2.JPG (38.7 KB, 7 views)
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 



 
Reply
Posted 2004-01-29, 02:46 AM in reply to BlueCube's post starting "Yep. Those other 2 didn't attach. ..."
Ok thanks. It works fine now woohoo! Thanks again.
"Try not! Do or do not, there is, no try!" Quote Yoda.
Old
Profile PM WWW Search
05thouldm is neither ape nor machine; has so far settled for the in-between05thouldm is neither ape nor machine; has so far settled for the in-between
 
 
05thouldm
 



 
Reply
Posted 2004-01-29, 11:14 AM in reply to 05thouldm's post starting "Ok thanks. It works fine now woohoo!..."
Whew, you're welcome. I should've done that in the first place...
Old
Profile PM WWW Search
BlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHzBlueCube enjoys the static noises of ten television sets simultaneously tuned to 412.84 MHz
 
 
BlueCube
 
 

Bookmarks

« Previous Thread | Next Thread »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules [Forum Rules]
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -6. The time now is 10:30 PM.
'Synthesis 2' vBulletin 3.x styles and 'x79' derivative
by WetWired the Unbound and Chruser
Copyright ©2002-2008 zelaron.com
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
This site is best seen with your eyes open.