Screen Tint and Time System If Else

Discussion in 'RPG Maker MV' started by jezebelthenun, Jan 30, 2017.

  1. jezebelthenun

    jezebelthenun Veteran Veteran

    Messages:
    99
    Likes Received:
    113
    Location:
    San Diego
    First Language:
    English
    Primarily Uses:
    RMMV
    Hi all,  Today I have a question about using if else statements in conditional branches.  I'm using a basic day/time system, and I'd like to have 3 different screen tints for different times of day.  Normal for day, sunset for the hours between 6 and 8 pm, and then dark for night.  How would I implement that in the conditional branch?

    This is what I tried, but it flashes from sunset to dark and back again over and over after 8pm.

    If : Hours >= 18


         Tint Screen : (68,-34,-34,0), 60 frames (Wait)


         If : Hours >= 20


         Tint Screen : (-68,-68,0,68), 60 frames (Wait)


         :End


    :Else 


         Tint Screen : (0,0,0,0), 60 frames (Wait)

    How do I use an if else in a conditional branch or check for a variable that's within a range?  I'm not a scripter to any degree so it doesn't make sense to me.

    Thanks
     
    #1
  2. Shaz

    Shaz Veteran Veteran

    Messages:
    37,582
    Likes Received:
    11,299
    Location:
    Australia
    First Language:
    English
    Primarily Uses:
    RMMV
    Code:
    If Hours >= 20
      Tint Screen (-68,-68,0,60)
    Else
      If Hours >= 18
        Tint Screen (68, -34, -34, 0)
      Else
        Tint Screen (0, 0, 0, 0)
      End
    End


    This should be in a parallel processing event, and at the end of the event you should do Erase Event.  You don't want it constantly running while you're on the map, tinting it to the tint that's already applied.  This is one of the big mistakes people make that causes significant lag.
     
    #2
  3. Ryzler

    Ryzler Princess in Distress Veteran

    Messages:
    84
    Likes Received:
    126
    Location:
    Nottingham, United Kingdom
    First Language:
    English
    Primarily Uses:
    RMMV
    What about when they're inside? Do you have the screen tint return to normal?
     
    #3
  4. jezebelthenun

    jezebelthenun Veteran Veteran

    Messages:
    99
    Likes Received:
    113
    Location:
    San Diego
    First Language:
    English
    Primarily Uses:
    RMMV
    @Shaz I knew it was something simple that I was being dumb about!  Thanks.  I swear, I've done this type of eventing with no issues before, and my brain just stopped working.

    @Ryzler I'm only putting the event with the tint change on outdoor maps, so everything indoors will always look normal.
     
    #4
  5. Ryzler

    Ryzler Princess in Distress Veteran

    Messages:
    84
    Likes Received:
    126
    Location:
    Nottingham, United Kingdom
    First Language:
    English
    Primarily Uses:
    RMMV
    @jezebelthenun But when you enter an indoor map, the screen tiny will remain from the outdoor map. So you need an event on the indoor map that changes the tint back to normal
     
    #5
  6. jezebelthenun

    jezebelthenun Veteran Veteran

    Messages:
    99
    Likes Received:
    113
    Location:
    San Diego
    First Language:
    English
    Primarily Uses:
    RMMV
    Well then, I guess I'll put an event changing the tint to normal on all indoor maps.  Thanks!
     
    #6
    Ryzler likes this.

Share This Page