Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> [VX/XP] Evented Clock Ticker, Basically a Clock that no one sees..
lilcooldude69
post Oct 18 2011, 12:36 AM
Post #1


The pro-est eventer u know ;D
Group Icon

Group: Revolutionary
Posts: 297
Type: Event Designer
RM Skill: Masterful




idk if anyones posted this or not, well it could be used for time systems without having to use a script, but whatever here it is....


Common Event
@>Loop
Edit for the If minutes are over 60

@>Conditional Branch: Variable [0003:Tmin] > 60
@>Control Variables: [0003: Tmin] -= 60
@>Control Variables: [0002: Thour] += 1
@>
: Branch End

@>Wait: 60 frame(s)
@>Control Variables: [0004: Tsec] += 1
@>Conditional Branch: Variable [0004:Tsec] == 60
@>Control Variables: [0003: Tmin] += 1
@>Control Variables: [0004: Tsec] = 0
@>
: Branch End
@>Conditional Branch: Variable [0003:Tmin] == 60
@>Control Variables: [0002: Thour] += 1
@>Control Variables: [0003: Tmin] = 0
@>
: Branch End
@>Conditional Branch: Variable [0002:Thour] == 24
@>Control Variables: [0002:Thour] = 0
@>
: Branch End
@>
: Repeat Above
@>


Set the Common Event parallel to a switch, and vola, you have a simulated clock, this could be used for a time system in game, like if it was 5 pm in game, it would be dark, or if it was 12 pm in game, it would be day,

Note: this is in game time, this isn't time outside of game, if you turn ur game back on and load a save point, the variables will be the same as they were when you saved.



Edit: changed the hour conditional to 24, idk why i put 12
Edit2: added a conditional to check if the minutes are over 60 if it is then it subtracts 60 minutes and adds 1 to an hour, it checks every second, this could be useful for people that use events to add time to the game time.


__________________________

My Userbars


Rated pg-13 part of signiture
Scientist A: "A single sperm has 37.5MB of DNA information in it. That means a normal ejaculation represents a data transfer of 1,587.5TB."
Scientist B: Too bad ejaculate has terrible packet loss
Scientist C:but the transfer does have a lot of redundancy

Go to the top of the page
 
+Quote Post
   
 
Start new topic
Replies (1 - 4)
Redd
post Oct 21 2011, 07:03 AM
Post #2


:<
Group Icon

Group: Revolutionary
Posts: 2,314
Type: Developer
RM Skill: Advanced




Very cool submission that I've actually got questions about A LOT! Now I can just reference this topic instead of telling them every time xD


__________________________
Go to the top of the page
 
+Quote Post
   
stripe103
post Oct 21 2011, 12:28 PM
Post #3


PHP ERROR: Couldn't get value from UInteger. Value too large
Group Icon

Group: Revolutionary
Posts: 737
Type: Mapper
RM Skill: Intermediate




Simple and useful. But could I just come with a suggestion?
For example changing it to check if the minutes are over 60 and then after that, lower the minutes by 60 and add 1 hour. This way, it the events add 120 to the minutes variable, the game will automaticly change it into 2 hours. Some people might like this more. Just a thought.

This post has been edited by stripe103: Oct 21 2011, 12:30 PM


__________________________

By Axerax

The rest of my sig



Go to the top of the page
 
+Quote Post
   
lilcooldude69
post Oct 23 2011, 03:56 AM
Post #4


The pro-est eventer u know ;D
Group Icon

Group: Revolutionary
Posts: 297
Type: Event Designer
RM Skill: Masterful




QUOTE (stripe103 @ Oct 21 2011, 01:28 PM) *
Simple and useful. But could I just come with a suggestion?
For example changing it to check if the minutes are over 60 and then after that, lower the minutes by 60 and add 1 hour. This way, it the events add 120 to the minutes variable, the game will automaticly change it into 2 hours. Some people might like this more. Just a thought.

hmm so you mean, put in a check that checks to see if the variable is over 60 minutes and if it is, subtract 60 from it and add 1 to the hour variable

edit: i did whatever it is u were asking i hope XD;;

This post has been edited by lilcooldude69: Oct 23 2011, 04:09 AM


__________________________

My Userbars


Rated pg-13 part of signiture
Scientist A: "A single sperm has 37.5MB of DNA information in it. That means a normal ejaculation represents a data transfer of 1,587.5TB."
Scientist B: Too bad ejaculate has terrible packet loss
Scientist C:but the transfer does have a lot of redundancy

Go to the top of the page
 
+Quote Post
   
stripe103
post Oct 23 2011, 07:46 AM
Post #5


PHP ERROR: Couldn't get value from UInteger. Value too large
Group Icon

Group: Revolutionary
Posts: 737
Type: Mapper
RM Skill: Intermediate




Yeah, you could do it like that too biggrin.gif


__________________________

By Axerax

The rest of my sig



Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 25th May 2013 - 08:44 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker