View Full Version: Timer function

Scenario Rpgmaker > Scenario Q & A > Timer function



Title: Timer function
Description: I love this thing, but can I do...


Jed - July 9, 2005 12:03 PM (GMT)
With the timer function in the sprite messenger. I can reset it to another/original time easily enough. But I was wondering if it was possible to add time onto the current time remaining. Or indeed reduce the time left.
Say I have a sprite to set the time going with 2:00 (2 minutes) on the clock. Then it starts counting down when activated.
What I want then is a separate sprite that adjusts the current time remaining.
I've tried [clock]+20 and [clock]+0:20 but neither add twenty seconds onto the count.

Another brief thing.
It seems that to end an effect, like the clock, or fog, or player mask, you append it with a "." full stop or a minus sign "-". Both work fine. Is there any time that they act differently, not at all or are they both correct syntactially?
eg. [torchlit] .
or [torchlit] -

Shadow - July 10, 2005 02:20 AM (GMT)
I don't know about the timer function, and I'll go and investigate it now.

As for the difference between '-' and '.', there is none - I can tell you that with 100% assurance.

Now to play around with the timer...

Shadow - July 10, 2005 02:43 AM (GMT)
I'm afraid I can't find anything simple to extend or decrease the current time by, however you can change the time through the sprite messenger to a set value whenever you like, whether the timer is already on or not - but you probably already knew that. :D

The way I always get around limitations of sprite messenger functions in Scenario is to use inquiries, and no matter how complicated they may seem it IS possible. Depending on how long your timer is, you can alter the time using inquiries.

Let's say, the player activates a timer set for 2:00. Then, if the player talks to a man on the right, he'll INCREASE the time for you. How do you do this?

First of all you need to inquire the current time. You'll need a few of these pages in which the sprite messenger will cycle through until you hit the right one.

You could do it like this:

Page 1:

INQUIRY: [GAME CLOCK]<10

That means the timer has 10 or less seconds to go. If this is true, the player will get sent to a page you have allocated through labeling. You can then, on that page, change the set time up OR down, depending on what you want.

Now the first page in line has to have the smallest value, because if it were [GAME CLOCK]<50, and the player had only 10 seconds left on the clock, it wouldn't work out very accurate at all.

So, this man who extends the time for you may say,

"Hi, I'm going to give you a little more time until something relatively evil occurs,"

The player has 30 seconds left on the clock.

The first inquiry ([GAME CLOCK]<10) is bypassed, the second inquiry ([GAME CLOCK]<20) is also bypassed, but the next inquiry ([GAME CLOCK]<30) is TRUE, therefore the player gets sent to a particular label, where you will make a new set time of however much you want. (If you wanted it to be 10 seconds more, you would set it at 40.)

Now I KNOW this isn't accurate, but you can narrow it down further than 10 seconds 5, 2, whatever...) but you're creating a lot more inquries for yourself, especially if the timer is a long one. Remember, whatever the value is the smallest one has to be first, and then next smallest, etc...

Sorry for sounding like a kindergarten teacher, but that's just me. A lot of that you probably already worked out, if not all of it, but I don't mind. Hopefully there is actually a quick and easy method to use to extend or decrease the current time, maybe David could answer that one.

Happy world-building. :)

Jed - July 10, 2005 07:28 AM (GMT)
Ah, that's good to hear about the effect stoppers. For some reason I'd built up a thought in the back of my mind that I was unsure about.

Right, yes, this timer function. I appreciate that. Thanks, Shadow. :)
It stands well for anyone else who has similar queries to check through this. So in fact, if anyone has any questions about the messenger icons and ways to use them, or if you're trying to get a certain effect, post up. There's plenty of support in this forum.

But yes, your suggestion of the inquiry sequence is the way I will take this. I like inquiring about things.

Shadow - July 11, 2005 01:16 AM (GMT)
And your idea has inspired me to create a little situation like this in my game. It's also inspired me to create a whole new section of the forum... not that I can. Though I DO think there should be a section of the forum where people can discuss puzzle ideas for dungeons and the like in Scenario, games could become much more complex this way. What d'ya think?

Jed - July 13, 2005 07:09 AM (GMT)
This would make a good section, for sure.
A game can really be given more depth that words and sprites. It's about the world's life, and how the player can progress through the game. Whether it be by puzzle, trading sequences, key item dependencies.

But as for puzzles, a popular one is mazes, I like to make "trials" and "missions", the latter to appear in a further game release. But other things, like solving a mystery, and more, are things we would benefit from discussing.

So, if there's no objection...
Can we have this section, David?




Hosted for free by InvisionFree