Can someone explain this?

hi, can someone explain this , like what is acually happaning when this sentence is compailed.

GetWorld()->GetTimeSeconds() gets the number of seconds since the game started. LastDoorOpenTime is the number of seconds the game had run when the door was last opened. This is subtracted from the current number of seconds. So if 10 seconds has passed in the game and the door was last opened 7 seconds into the game then GetWorld()->GetTimeSeconds() - LastDoorOpenTime = 3. Finally the ‘if’ statement checks if 3 is more than DoorCloseDelay (whatever that is set to) and if so, closes the door. Hope that helps :slight_smile:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms