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.
[VX] Time Event

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 86
Description

     This event process is a basic Time Event Process.

Process

   This will take 4 different events to do. Don't worry, they are simple events.
First Event:
You'll need 2 pages; Both need to be set to Parallel Process.
Now in the Event Commands you'll need to put:


@>Conditional Branch: Variable [0001:Seconds] == 60
     @>Control Variables: Variables [0002:Minutes] += 1
     @>Control Variables: Variables [0001:Seconds] = 0
     @>
:    Else
     @>Conditional Branch: Variable [0002:Minutes] == 60
          @>Control Variables: Variables [0003:Hours] += 1
          @>Control Variables: Variables [0002:Minutes] = 0
          @>
      :    Else
          @>Conditional Branch: Variable [0003:Hours] == 13
               @>Control Variables: [0003:Hours] = 1
               @>Control Switches: [0001:AM/PM] = ON
               @>
           :   Else
               @>
           :   Branch End
          @>
      :   Branch End
     @>
:    Branch End
@>

Now on Page 2, copy everything on Page 1 and put it on Page 2.
Set the Conditions of the Page to Switch: 0001[AM/PM] is ON.
And on the third Conditional Branch, change:
       
       @>Control Switches: [0001:AM/PM] = ON
to:       @>Control Switches: [0001:AM/PM] = OFF

Now for the Second Event:
You'll just need 1 Page for this Event and it needs to be set to Parallel Process also.
In the Event Commands it needs to have:

@>Wait: 60 frame(s)
@>Control Variables: [0001:Seconds] += 1
@>

The Third Event:
You'll need 2 Pages. First Page is set on Parallel Process and the Second Page needs set on Action Button.
First Page Event Commands:


@>Control Variables: [0002:Minutes] = Random No. (1...59)
@>Control Variables: [0003:Hours] = Random No. (1...12)
@>Control Self Switch: A =ON

Second Page needs to have its Conditions set for Self Switch A is ON.
The Event Commands for Page 2 is Blank.

*NOTE* = The Third Event is mainly so when you first start your game, the time wont start at 00:00.

The Fourth Page is mainly so you can see what time it is.
It'd make the most since if you placed this Event on something like a clock in your game.

The Forth Event:
You will need 2 Pages. Both Pages need to have the Priority set to Same as Character.
And both Pages' Trigger need to be set on Action Button.

First Page Event Command:


@>Conditional Branch: Variable [0002:Mintues] < 10
     @>Text: -, -, Normal, Bottom
      :         : \v[3]:0\v[2] AM
     @>
:    Else
     @>Text: -, -, Normal, Bottom
      :         : \v[3]:\v[2] AM
     @>
:    Branch End
@>

Page 2 is the same as Page 1 except the Pages' Condition needs to be set to Switch [0001:AM/PM] is ONAnd Both Text Commands in the Event Commands need to same PM instead of AM.

Demo

I haven't made a Demo since it's pretty simple to make, however, if someone would like one please let me know.

Please comment here or PM me and tell me if something doesn't work or if you don't understand something.

« Last Edit: February 23, 2014, 04:02:32 PM by modern algebra »

*****
my name is Timothy what's yours
Rep:
Level 79
Hello
2014 Best IRC Quote2014 Zero to Hero2014 Most Missed Member2012 Zero To HeroSecret Santa 2012 ParticipantContestant - GIAW 9For frequently finding and reporting spam and spam bots2011 Zero to Hero
In the first event, you don't need two pages. You can just use the toggle switch function. You don't need the second event either, you can have it running on the same page as the first one.
You hardly need the third event either if when you can manually change the time through variables.
The fourth event only needs one page; just use a conditional to check whether the AM/PM is on or off, then have the other conditionals in there.
That being said, I only know this because I made a very similar system myself (but didn't share it). Your way is perfectly fine, maybe even better functioning.
it's like a metaphor or something i don't know