I am new to GameMaker's coding language or GML. I have learned and done a lot so far, but now i am having a problem. I have a countdown timer starting at 5 minutes counting down and I want the player to receive points based on how much time is left kind of like in Super Mario Bros. along with the points accumulated for performing other tasks. How do I go about doing this with the coding language? Thanks in advance!
My suggestion may sound obvious, but why don't you try the following.
1) Save in a counter the time left when a player finishes the current level. Let's call it "time_left".
2) Set a loop that runs, for instance, every millisecond. At each iteration of that loop, you decrease X from "time_left".
3) At the same time, at each iteration you increase X*Y your score counter.
The trick here is only the values you will use for X and Y. The simplest way is to chose X=1, because then Y becomes merely the value you give as a score-give per each millisecond, depending on your score scale. Of course, if the loop at step 2 runs for every each millisecond, then Y probably should probably be a small float number.
I never worked with GameMaker, so I don't know its language. In C#, you could easily accomplish that with a Couroutine that at the end, yields a "wait for seconds". But if you have a problem making a loop run every given time (e.g. each millisecond or second or whatever) in your language and also wants the counting to be slower so the player can see it, you can also try just decreasing X from the "time_left" counter and increasing X times Y to the score counter, every frame*delta.Time.
It's a simple solution, but that can work pretty well depending on what you want.
PS: in case you don't know what I mean by delta.Time, it is a measure of how much time has elapsed since the last frame was ended and the current began.