Charas-Project

  • Home
  • Help
  • Search
  • Calendar
  • Login
  • Register
*
Please login or register.

Login with username, password and session length
 

News:

New forum theme up and running!



  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Getting Timers to Work
« previous next »
  • Print
Pages: [1]

Author Topic: Getting Timers to Work  (Read 5289 times)

Offline carrionmarksman

  • 'Twas the 1980s...
  • Associate
  • *
  • Posts: 212
  • "Games keep me legal :D"
Getting Timers to Work
« on: August 08, 2009, 11:29:44 PM »
How do you go about doing that? Timers don't seem to ever work for me. I have "Start Timer", and when I have it displayed on screen, it doesn't budge from 0. I'm trying to set up a day/night system too.
Logged

Offline Dragonium

  • Aieee!
  • Staff
  • Royal
  • *
  • Posts: 3,786
  • MY PRISON IS SHAME
    • Dumb Youtube Stuff
Re: Getting Timers to Work
« Reply #1 on: August 08, 2009, 11:39:48 PM »
It's more work but I suggest making a simple timer using a Parallel Process and some variables. It's more reliable and a lot easier to customise and troubleshoot.
Logged

Offline carrionmarksman

  • 'Twas the 1980s...
  • Associate
  • *
  • Posts: 212
  • "Games keep me legal :D"
Re: Getting Timers to Work
« Reply #2 on: August 08, 2009, 11:40:53 PM »
So I should just set it up to have a variable, then inside a loop, variable +1? Then after a certain amount, the desired action?

Edit: WOW LAG
« Last Edit: August 09, 2009, 12:18:50 AM by carrionmarksman »
Logged

Offline luigifan33

  • Whoa, whoa, whoa.... Wait, what?
  • Initiate
  • *
  • Posts: 75
  • Great, now I have no good picture....
Re: Getting Timers to Work
« Reply #3 on: September 03, 2009, 02:37:28 PM »
I'm not sure, but I think that timers count down from where you set it at.
As for your day to night problem I have a scheme that works well for me with no lag.
Here it is
[DAY TO NIGHT MADE EASY
By Gimp Master

This guide is for all people who are new to RM2K or can’t get
 the other day to night guides to work.
As I can’t get any Day/Night system to work I decided to use my
 brain/sawdust to try and think of a way to get this thing to
work. Afther I did I though I’m can be the only one who is
have trouble with it so I made this guide for you people.

DAY

In common events name one of the events Day make the event
start condtion parallel process and appear in event day.
Then make the events commands wait 0.1s and a variable that
is called day (again) and make it + 1 do this by click on
the + sign and make the set 1. Then make a fork condition
then make it set as variable Day then at the set button
set it to 7000 and make it above. Next set the screen tone
 as R070, G090, B070, S090 (Or whatever you want) you make
 a message here if you want but only if you want.
Now go to change variable and set day to 0 then turn day
switch off and evening switch on. Ok if you didn’t get
 that this is what the screen should look like:

<>Variable Op: [0001: Day] + , 1
<>Fork Optn: [0001: Day]-7000over
 <>Set screen tone: (R070, G090, B070, S090),1.0sec(W)
 <>Variable Op: [0001: Day] Set, 0
 <>Change switch [0019: Day] off
 <>Change switch [0020: Evening] on
 <>
: Excepting Case
<>
: End Case

EVENING

Now start on another event still in common events and make
it a parallel process again and make work in event evening
now copy the stuff from the last page and paste it on to
this page. Now change the first variable event to evening
variable but still doing the same thing. The screen tone
to R000,G050,B070,S080. The next variable op change that
to the evening variable and still do it the same thing.
Now change the first switch to evening off and the second
one to night on. Once again this is what it should look like:

<>Variable Op: [0002: Evening] + , 1
<>Fork Optn: [0002: Evening]-2466over
 <>Set screen tone: (R000, G050, B070, S080),1.0sec(W)
 <>Variable Op: [0002: Evening] Set, 0
 <>Change switch [0020: Evening] off
 <>Change switch [0021: night] on
 <>
: Excepting Case
<>
: End Case

NIGHT

There ain’t much point to explain like above so I’ll just
show what is should look like. Remember to set in a
parallel process and in switch night

<>Variable Op: [0003; Night] + , 1
<>Fork Optn: [0003: Night]-2466over
 <>Set screen tone: (R070, G080, B080, S090),1.0sec(W)
 <>Variable Op: [0003: Night] Set, 0
 <>Change switch [0021: Night] off
 <>Change switch [0022: morning] on
 <>
: Excepting Case
<>
: End Case

 MORNING

You now should know what your doing with the events but
this is what it should look like

<>Variable Op: [0004: Morning] + , 1
<>Fork Optn: [0004: Morning]-2466over
 <>Set screen tone: (R000, G050, B070, S080),1.0sec(W)
 <>Variable Op: [0004: Morning] Set, 0
 <>Change switch [0023: Morning] off
 <>Change switch [0020: Day] on
 <>
: Excepting Case
<>
: End Case

There you have it all you have to do is in your opening event
put the switch Day on or what time you want your game to start.
If you do use this system please state so in your credits and
send me a copy of the game as I would like to see how other
people game turn out with this system anyway good luck with
your game. Send them or if your having probs send to
gimpinmaster@hotmail.com ,Gimp Master]
Follow this and it should work.
Logged
I have a laptop! Although, I still have little motivation to do much. Hopefully I can actually do a project without stopping this time.

Offline Red Giant

  • Leader
  • *
  • Posts: 2,608
  • The best damn bio in the whole damn world. YEAH!!
Re: Getting Timers to Work
« Reply #4 on: September 03, 2009, 02:39:09 PM »
If I remember correctly (Haven't used rpgm in a while) Timers count DOWN, not up. You have to set a time before starting.
Logged

Offline SaiKar

  • KOFFING!
  • Staff
  • Royal
  • *
  • Posts: 4,082
Re: Getting Timers to Work
« Reply #5 on: September 03, 2009, 08:23:31 PM »
Quote from: carrionmarksman on August 08, 2009, 11:40:53 PM
So I should just set it up to have a variable, then inside a loop, variable +1? Then after a certain amount, the desired action?

Edit: WOW LAG
Add a wait in there, otherwise it will lag you completely to heck. Even a wait 0.0, which logically should do nothing, helps break up lag from processes getting out of control.

Quote from: Red Giant on September 03, 2009, 02:39:09 PM
If I remember correctly (Haven't used rpgm in a while) Timers count DOWN, not up. You have to set a time before starting.
Yes
Logged

Offline Bluhman

  • Global Moderator
  • Royal
  • *
  • Posts: 4,977
Re: Getting Timers to Work
« Reply #6 on: September 03, 2009, 09:06:01 PM »
Quote from: Red Giant on September 03, 2009, 02:39:09 PM
If I remember correctly (Haven't used rpgm in a while) Timers count DOWN, not up. You have to set a time before starting.

Yeah, what he said. If you want a timer that counts up, then you'll add variables with a wait function. The most logical thing to do would be to have the parallel process wait a second, add one number to the variable, and then have variable checking and picture coding that displays the proper time on the screen (if that's what you seek).
Logged

  • Print
Pages: [1]
« previous next »
  • Charas-Project »
  • Game Creation »
  • Requests »
  • Tutorials »
  • Getting Timers to Work
 

  • SMF 2.0.10 | SMF © 2015, Simple Machines
  • XHTML
  • 2O11
  • RSS
  • WAP2
  • Simple Machines Forum