Timed items

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
246
Reaction score
127
First Language
English
Primarily Uses
RMMV
I am not sure where to put this. I found like three places where this would be appropriate, depending on the situational outcome (JS Support, JS Requests and here). Please move if the situation changes.

Hello. I wanted to know if there was a way to make an item timed upon obtaining it.

Example: You received an EXP Medal (100%)! *Has a 24 hour timer from the moment it's obtained and shows it somewhere updating in real time*

Side note: I use Orange Time System but don't see anywhere you can add time to an item. So I'm not sure if it's a plug-in issue or it can be done using pure scripting.

Thanks!
 

Bex

Veteran
Veteran
Joined
Aug 2, 2013
Messages
1,350
Reaction score
332
First Language
German
Primarily Uses
RMMV
Edit: Oh No, i totally forgot about the Eventcommand Timer :kaoswt:
So you would not need to create a Timestamp if you use the standard timer.

And is this for 1 Item or for many different Items?

-----------------------------------------------------------------------------------------------
You would need to create a Timestamp.
In Theory:
- Your Item needs help of 2 Game Variables and Switch.
- Control Variable1 = set to Game Time at this current moment.
- Control Variable1 += add for example 600 to variable1. (Now we have something like a Time stamp in variable 1, we need this for later) Maybe activate your Plugin Timer at this point, if you event one this comes later.
- Add Item and Activate Switch1.

- Switch1 is Page Condition for a Parallel Common Event, which will run the Time Check and maybe also the countdown if you dont have a plugin for that. (But Eventing a Countdown with Pictures, is a Topic for itself :kaothx:)
- Eventcode for Common Event:
- Control Variable2 = set to Game Time at this current moment.
- Conditional Branch: Is Variable2 equal or more than Variable1?
if yes: Textbox: 10 Seconds has passed. The Timestamp Worked
- do stuff like delete timer, than Turn Switch1 OFF

- After the first Condition Block, you could insert the Evented Timer Pictures and stuff like that.

- Than we do a check if that exp item is still in inventory, if not we deactivate the timer and end this event by turning switch1 off again.
Conditional Branch Item in Inventory?
if yes: Nothing ; else: turn off timer and turn switch1 off.

- At the end Eventcommand Wait 60 Frames or less (Its enough that the code runs 1 or 2 Times every second)

I did not use Orange Overlay yet, so i cant help with that part.
Edit: This also just works for 1 or 2 single Items, as soon you want that for many Items, the workload would be very much, so a Plugin could be better suited for that Job.
 
Last edited:

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
246
Reaction score
127
First Language
English
Primarily Uses
RMMV
Edit: Oh No, i totally forgot about the Eventcommand Timer :kaoswt:
So you would not need to create a Timestamp if you use the standard timer.

And is this for 1 Item or for many different Items?

-----------------------------------------------------------------------------------------------
You would need to create a Timestamp.
In Theory:
- Your Item needs help of 2 Game Variables and Switch.
- Control Variable1 = set to Game Time at this current moment.
- Control Variable1 += add for example 600 to variable1. (Now we have something like a Time stamp in variable 1, we need this for later) Maybe activate your Plugin Timer at this point, if you event one this comes later.
- Add Item and Activate Switch1.

- Switch1 is Page Condition for a Parallel Common Event, which will run the Time Check and maybe also the countdown if you dont have a plugin for that. (But Eventing a Countdown with Pictures, is a Topic for itself :kaothx:)
- Eventcode for Common Event:
- Control Variable2 = set to Game Time at this current moment.
- Conditional Branch: Is Variable2 equal or more than Variable1?
if yes: Textbox: 10 Seconds has passed. The Timestamp Worked
- do stuff like delete timer, than Turn Switch1 OFF

- After the first Condition Block, you could insert the Evented Timer Pictures and stuff like that.

- Than we do a check if that exp item is still in inventory, if not we deactivate the timer and end this event by turning switch1 off again.
Conditional Branch Item in Inventory?
if yes: Nothing ; else: turn off timer and turn switch1 off.

- At the end Eventcommand Wait 60 Frames or less (Its enough that the code runs 1 or 2 Times every second)

I did not use Orange Overlay yet, so i cant help with that part.
Edit: This also just works for 1 or 2 single Items, as soon you want that for many Items, the workload would be very much, so a Plugin could be better suited for that Job.
I was not expecting this. This is complicated. I'll see if I can wrap my head around it later on today, but from what I am seeing, this uses the built in timer option in MV, no?

Edit: for more then one item.
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,523
Reaction score
6,870
First Language
German
Primarily Uses
RMMV
Edit: for more then one item.
in this case you cannot use the official timer, because there is only one such timer.

There are different ways to handle this, but you always need two blocks of commands, one to start the timer and one to check for the end of the timer, whatever you use as a timer.

If the description above was too complex for you to follow, then I strongly suggest you use one of the event timer plugins to handle this for you. Be careful when searching - event timer is NOT the same as a time system plugin like Orange's.

Because as you already learned it is something different to add or create timer countdowns than to handle the flow of time in a game. If I remember correctly Shaz has made an event timer plugin, but I don't have the link.
 

Jenova

Because you are...a puppet!
Veteran
Joined
Nov 29, 2017
Messages
246
Reaction score
127
First Language
English
Primarily Uses
RMMV
in this case you cannot use the official timer, because there is only one such timer.

There are different ways to handle this, but you always need two blocks of commands, one to start the timer and one to check for the end of the timer, whatever you use as a timer.

If the description above was too complex for you to follow, then I strongly suggest you use one of the event timer plugins to handle this for you. Be careful when searching - event timer is NOT the same as a time system plugin like Orange's.

Because as you already learned it is something different to add or create timer countdowns than to handle the flow of time in a game. If I remember correctly Shaz has made an event timer plugin, but I don't have the link.
Found it and the only practical use I can see it being used with is common events. That's ok. It's solves the problem, for now. I'll bump this if something comes up
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I've made a rudimentary prototype map for the first game with the MV RTP overworld tiling. I'm probably going to photoshop the crap out of it for parallax, but the prototype has given me new ideas about how I want to place dungeons in the game.
I got tired of not having an avatar image. Couldn't think of anything cool. So I'm just using my game's antagonist instead... How original. At least both of our names start with C?
Expectation: Design/dev a game for the game jam | Reality: "These codes suck, why did I do it this way? lemme fix this. Also what if I add feature xyz because... well, I can."
Did my first script call in an event! :kaopride: It's completely useless and just because I thought it'd be cute if looking at clocks in-game made the character say the real-world time, but it's fully functional scripting and I did it all by myself!
Stream will be going live shortly! I will be playing Resident Evil 3 Remake, and then I will be switching to a session of the Interactive Text Adventure! Feel free to drop by!

Forum statistics

Threads
95,634
Messages
930,591
Members
125,946
Latest member
type001
Top