Using Comment Event to speed boost

Discussion in 'RPG Maker MV Deployment' started by Kristina, Jun 29, 2019.

  1. Kristina

    Kristina Veteran Veteran

    Messages:
    39
    Likes Received:
    40
    First Language:
    Danish
    Primarily Uses:
    N/A
    Hello!
    I'm not sure what I do wrong here, so could use some fresh eyes.

    The idea is simple.
    When the player drinks a cup of coffee (item) they get a speed boost that last 30 seconds.

    So I thought making a comment event or two to be specific and link it to the item would do the trick, but I just can't get it to work.

    Can anyone see what I'm doing wrong here?

    [​IMG]

    [​IMG]

    [​IMG]

    Thanks!
     
    #1
  2. GuiltySlug

    GuiltySlug Villager Member

    Messages:
    10
    Likes Received:
    20
    First Language:
    English
    Primarily Uses:
    RMMV
    In your part 2 event, you have the speed boost turning off if the timer is greater than or equal to 0:00. Try changing that to < and see what happens, but I'm not well-versed enough in how common events work to know if that's the entire problem.
     
    #2
    Bex and caethyril like this.
  3. Eliaquim

    Eliaquim Raze: The Rakuen Zero's Guardian! Veteran

    Messages:
    856
    Likes Received:
    332
    Location:
    Brazil - Rio de Janeiro
    First Language:
    Portuguese - Br
    Primarily Uses:
    RMMV
    If you don't want to show a timer for that, you can just make this with common events:
    [EDIT] OPS, instead of "Wait 30 frames", you can put two times:
    Wait 900 frames
    Wait 900 frames
    This will be equal to 30 seconds ^^
    [​IMG] [​IMG]
     
    #3
  4. Kristina

    Kristina Veteran Veteran

    Messages:
    39
    Likes Received:
    40
    First Language:
    Danish
    Primarily Uses:
    N/A
    It worked! I knew it was something really small that was the issue, haha. Thanks!

    Thanks, didn't think about that :)
     
    #4
  5. caethyril

    caethyril ^_^ Veteran

    Messages:
    1,315
    Likes Received:
    818
    Location:
    UK
    First Language:
    English
    Primarily Uses:
    RMMV
    @Eliaquim: depends a bit on the scenario, but I would not recommend this in general, since parallel events reset on map change, i.e. the parallel event will restart from the top whenever the player moves to another map. :kaoback:

    If you want to avoid the built-in Timer, I'd suggest using a variable and shorter wait times, e.g.
    Code:
    ◆Comment:1800 frame wait time (1800/60 = 30 seconds)
    ◆Control Variables:#0001 frameWait = 1800
    ◆Control Switches:#0001 Timer Active = ON
    Code:
    ◆Comment:Check value
    ◆If:frameWait ≤ 0
      ◆Comment:End "timer"
      ◆Text:None, Window, Bottom
      :    :Time's up!
      ◆Control Switches:#0001 Timer Active = OFF
      ◆
    :Else
      ◆Comment:-6 every 6 frames (0.1 seconds).
      ◆Control Variables:#0001 frameWait -= 6
      ◆Wait:6 frames
      ◆
    :End
    This reduces the possible error to (in this case) 6 frames per map change. Since the wait time is after the check, it also helps ensure that the total duration can never be more than 1800 frames. :kaothx:
     
    #5
    Eliaquim likes this.

Share This Page