This topic will include lectures 4.111 and .112.
In the Challenge of 4.111
I could not figure out how to do what was asked for the life of me. I knew it had to be a mirror image, and that if may be involved. But strangely enough, it was because I was overcomplicating the situation. No “while” statements, only an if, or rather an “else” attached to the if that opens the door.
The CloseDoor function did not require me to change “CurrentYaw” function at all, but I was right that the TargetYaw should be changed to Initial yaw.
In 4.112
I did not understand that I had to place the GetWorld()->GetTimeSeconds() at the start of the if statement nestled in the else one. I thought that I had already set it with the DoorLastOpened, and only needed to state that if it is greater than the DoorCloseDelay.
But I suppose it makes sense as the timer is set at DoorLastOpened, and if that timer, minus the DoorLastOpen counter (which is currently zero), reaches a time greater than the one set in DoorCloseDelay (which was .4 for me), then close the door.
Be sure to run through that paragraph though, my understanding might be incorrect as it is still a little vague in my own mind.
Regardless, I came out in the end. I have my light, I have my set time. I even exposed that time to the editor for ease sake. Off to the next lesson!