Sgt. Cookie
Sponsor
Hi I'm Darth J and I am going to be your teacher for this lesson.
I am going to teach you how to make time system.
First get your self four variables and name them: Hours1, Hours2, Minutes1 and Minutes2 got all that? Good.
Now we need a common event so go get one and I'll eat a sandwich while I wait.
Show hage eww hot oge "gulp" sorry so have you got one? "chours of "yes Darth J"" Good.
now put a loop event into it. Ok when you have that put a wait command into the first line this command needs to be half your frame rate. The default is forty and that means forty frames a second. Now the wait command doubles the frames you actualy want to wait so if you wait forty frames event wise you wait eighty game wise got that? Good.
So if you havent tamperd with the frame rate wait 20 frames. Now I need a glass of water so you do that while I go and get one."Five minutes later" ok so have done that? "chours of "yes Darth J"" Good. "Glug" Now at the end of those 20 waited frames add an event that controls the "minutes2" variable and make it add one to that variable. When you have done that add a conditonal branch that when the variable "minutes2" is nine you change "minutes1"
by adding 1 to that variable and setting "minutes2" to zero. After you make that one make another conditonal branch that states when "minutes1" is six you add one to "hours2" and "minutes1" is set to zero. so you have got an hour set up thats brilliant but the are four more conditonal branches to go . now make another conditonal branch that states when "hours2" is nine and another conditonal branch states that "minutes1" is six you can add one to "hours1" and set "hours2" to zero. Now you need a conditonal branch that says when variable "hours1" is two and another that says when variable "hours2" is 4 change both "hours1" and "hours2" back to zero. and there you have it if you are confused it should look like this:
And there is your time system oh and before I forget make an item called clock non consumable and when used it shows the time the text should look like this :The time is: \v[19]\v[20]:\v[21]\v[22]
Simply change the numbers to the numbers that your time variables are.
When I have had a few replys telling me how great I am and how useful this is I will gice a lesson on how to make shops be open and closed a different times.
And theres the bell now off to your next class.
I am going to teach you how to make time system.
First get your self four variables and name them: Hours1, Hours2, Minutes1 and Minutes2 got all that? Good.
Now we need a common event so go get one and I'll eat a sandwich while I wait.
Show hage eww hot oge "gulp" sorry so have you got one? "chours of "yes Darth J"" Good.
now put a loop event into it. Ok when you have that put a wait command into the first line this command needs to be half your frame rate. The default is forty and that means forty frames a second. Now the wait command doubles the frames you actualy want to wait so if you wait forty frames event wise you wait eighty game wise got that? Good.
So if you havent tamperd with the frame rate wait 20 frames. Now I need a glass of water so you do that while I go and get one."Five minutes later" ok so have done that? "chours of "yes Darth J"" Good. "Glug" Now at the end of those 20 waited frames add an event that controls the "minutes2" variable and make it add one to that variable. When you have done that add a conditonal branch that when the variable "minutes2" is nine you change "minutes1"
by adding 1 to that variable and setting "minutes2" to zero. After you make that one make another conditonal branch that states when "minutes1" is six you add one to "hours2" and "minutes1" is set to zero. so you have got an hour set up thats brilliant but the are four more conditonal branches to go . now make another conditonal branch that states when "hours2" is nine and another conditonal branch states that "minutes1" is six you can add one to "hours1" and set "hours2" to zero. Now you need a conditonal branch that says when variable "hours1" is two and another that says when variable "hours2" is 4 change both "hours1" and "hours2" back to zero. and there you have it if you are confused it should look like this:
Simply change the numbers to the numbers that your time variables are.
When I have had a few replys telling me how great I am and how useful this is I will gice a lesson on how to make shops be open and closed a different times.
And theres the bell now off to your next class.