Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Timer Problem

Status
Not open for further replies.

Arythorn

Towns Guard
Xy$
0.00
As mentioned Previously, MV has a rather flawed timer system, , the only real thing it need to fix it is it should have a Option under the Timer to create a "Upon End of Timer" branch.

Having this option would prevent problems such as the one I have here... Here is my Code, the problematic part I have underlined, the main area, in Bold. (This is a timed Inn that will kick you out after a certain time until the Pass item is acquired - just to clarify :D)

◆If:Pass is ON
◆Text:People3(4), Transparent, Bottom
:Text:Greetings, To enter you must pay our
:Text:customary-
:Text:
:Text:
◆Text:People3(4), Transparent, Bottom
:Text:Oh! I see you have an Inn Pass! Jolly Good.
:Text:Please do proceed, Pardon Me, madam...
◆Set Movement Route:This Event (Wait)
:Set Movement Route:◇Move Up
:Set Movement Route:◇Move Right
:Set Movement Route:◇Turn Left

:Else
◆Text:None, Transparent, Bottom
:Text:Greetings, To enter, you must pay our customary fee of
:Text:25G! If you want a Pass, Please speak with the merchant
:Text:upstairs!
◆Show Choices:Pay 25G, Leave (Transparent, Right, -, -)
:When Pay 25G
◆Change Gold:- 50
◆Set Movement Route:This Event (Wait)
:Set Movement Route:◇Move Up
:Set Movement Route:◇Move Right
:Set Movement Route:◇Turn Left
◆Control Timer:Start, 5 min 0 sec
◆Label:Timer
◆If:Timer ≤ 0 min 0 sec
◆Jump to Label:End Timer

:End

◆Label:End Timer
◆Text:People3(4), Transparent, Bottom
:Text:RIGHT, TIMES UP! GET OUT OF THE BUILDING!
◆Transfer Player:Oakenshore Town (24,9) (Direction: Down)

:When Leave
◆Set Movement Route:Player (Wait)
:Set Movement Route:◇Move Down

:End

:End
Thanks in Advance,
BeeTree02 :)

(P.S. Sorry for Posting this on the old Thread, I did not realize that I needed to create a new Thread instead, Thanks @LTN Games for telling me!)
 
Last edited:

Dad3353

Praised Adventurer
Try adding the line in Yellow...

◆Control Timer:Start, 5 min 0 sec
◆Label:Timer
◆If:Timer ≤ 0 min 0 sec
◆Jump to Label:End Timer

:End
◆Jump to Label:Timer

◆Label:End Timer
 

Arythorn

Towns Guard
Xy$
0.00
Try adding the line in Yellow...

◆Control Timer:Start, 5 min 0 sec
◆Label:Timer
◆If:Timer ≤ 0 min 0 sec
◆Jump to Label:End Timer

:End
◆Jump to Label:Timer

◆Label:End Timer

Result - Froze player movement but not full game as the timer still counted down.
[doublepost=1471791754,1471791251][/doublepost]
Result - Froze player movement but not full game as the timer still counted down.
BUT, I will check if the Player gets "Kicked Out" so we know if that works. Oh, and even if I use my touchscreen on my laptop or click with my mouse, It still will not move the player, I tried using the Wait command before, but again, no player movement worked...
 

Dad3353

Praised Adventurer
@BeeTree02 ...

Try making just a small, dummy Event with only the Timer part (count just 5 seconds, for instance...), just to get that part under your belt. Expand, adding functionality and test as you go. The error will show up sooner or later.
In passing, the 'text' output posted is fine, but a screenshot of the actual Event could be useful, too, as there is more to an Event than simply the Commands. Any chance of a pic..?
 

Arythorn

Towns Guard
Xy$
0.00
@BeeTree02 ...

Try making just a small, dummy Event with only the Timer part (count just 5 seconds, for instance...), just to get that part under your belt. Expand, adding functionality and test as you go. The error will show up sooner or later.
In passing, the 'text' output posted is fine, but a screenshot of the actual Event could be useful, too, as there is more to an Event than simply the Commands. Any chance of a pic..?
At least it solved the "not getting kicked out after time's up" problem...

As for a screenshot -

upload_2016-8-21_16-16-30.png


If anything else needs to be screenshot, just ask and I will get it back to you ASAP. :D
[doublepost=1471793427,1471792639][/doublepost]So, I have managed to fix the Problem. Here are the Updated SCREENSHOTS (Incredible, I know...) -

upload_2016-8-21_16-28-49.png

And the New Event as suggested

upload_2016-8-21_16-29-29.png

This did work, thank you for the help by the way :)
 

Attachments

Last edited:

Dad3353

Praised Adventurer
You also need a 'Stop' command...

:End

◆Label:End Timer
◆Control Timer:Stop
◆Text:People3(4), Transparent, Bottom

I use a Common Event for Timers, I would suggest something like...

When Pay 25G
◆Change Gold:- 50
◆Set Movement Route:This Event (Wait)
:Set Movement Route:◇Move Up
:Set Movement Route:◇Move Right
:Set Movement Route:◇Turn Left
Control Switches : Bar_Timer On
:When Leave
◆Set Movement Route:Player (Wait)
:Set Movement Route:◇Move Down

:End

:End

Common Event : Bar_Timer, Parallel Trigger, Switch Bar_Timer
◆Control Timer:Start, 5 min 0 sec
◆Label:Timer
◆If:Timer ≤ 0 min 0 sec
◆Jump to Label:End Timer

:End
◆Jump to Label:Timer
◆Label:End Timer
◆Control Timer:Stop
◆Text:People3(4), Transparent, Bottom
:Text:RIGHT, TIMES UP! GET OUT OF THE BUILDING!
◆Transfer Player:Oakenshore Town (24,9) (Direction: Down)
Control Switches : Bar_Timer Off



... Create the Common Event, using the Blue info, and replace the present stuff with the Mauve line. The Bar_Timer Switch will activate, in parallel, the Timer, which, when time up, will trigger the eviction and turn itself off; meanwhile, the folks in the bar will be free to move about.
Any help..?

Edit: Crossed posts, it would seem..! You're nearly there; well done..!
 

Arythorn

Towns Guard
Xy$
0.00
Just after the Label 'End Timer'...

:End
◆Label:End Timer
◆Control Timer:Stop
Thank You once again for the Help, this Forum will most certainly be seeing me more often!

(Hope this does not count as rule-breaking, but i DID read the rules and did not find anything regarding posting topic links if they were your own....)
In addition to this, If you have the time and would not mind helping me again, I do have another problem, but not sure whether or not there is a solution or how it would be executed.

https://rpgmakermv.co/threads/glowing-gate-help.4770/#post-33384
 

Attachments

Status
Not open for further replies.
Top