Well, first a bit of background information. So the way variables work is that RAM has a bunch of slots called addresses that can hold a value. In a modern programming language, you can define a variable mid-program which will run some background process to find a free spot in RAM and use that address going forward for variable you are using. On the NES, there is no functionality to find a free spot of RAM, so you have to define all your variables outside of the program like in NESmaker. By "define" what I mean is that an address is given a name for it to be easier to know which address you are using to store a value. You could use and address without giving it a name, but that would make your code harder to read. You define your variable outside of the program, but you initialize it within the program. When you give it an initial value in NESmaker, at the beginning of the game's code there is a routine that runs through all the variables you have defined in NESmaker and sets them to their initial value. The addresses are always there where you uses them or not, and you can use any of them at any time.
What I think I am trying to get at is that you don't really need to worry about the initial value of your variable when you set up your variable in NESmaker. The only time that you want this timer code running is when you are holding down a direction. So any time a direction is not being held the value in that address doesn't matter. What matters is when you set the variable. In your on direction pressed code, you should store a value into that variable. Something like this:
Code:
LDA #$40 ;; The amount of time you want your timer to last
STA transitionTimer
If you are doing a platformer, then you don't need to worry about what happens when the player switches going from left to right or right to left because when they switch you should have the same timer setting code in the on left pressed as you do in the on right pressed code. If you are doing a top down game were it could be possible to go in two directions at once like up and left, then this could get a little more complicated.
I hope this answered your question.
Also for convenience you could set up a constant in NESmaker for your timer length add use that in both your left and right pressed code so you can change the constant to tweak the timer length instead of having to change it in both the left and right pressed scripts every time you want to tweak it. It would look something like this:
Code:
LDA #TRANSITION_TIMER_LENGTH
STA transitionTimer