Zonar Games Posted July 11, 2006 Report Share Posted July 11, 2006 I'm using Game Maker 6.1 and do you guys know when at the end of a level in moden Sonic games, how it shows: Rings, Time, Score, Final Score something like that and for each ring the player gets 100 points and the same thing for Time, and Score and decreases to the players final score. I hope I'm not confusing you guys but I hope you get what I mean how would I implement something like that in my game using Game Maker? Link to comment Share on other sites More sharing options...
USC Posted July 11, 2006 Report Share Posted July 11, 2006 Well, I don't use GameMaker, but I think I can give you an idea (I'm assuming that you know a good deal about Game Maker). Alright, you have three variables (Time, Rings, Score) and one global variable (Total/Final Score). Make another variable (I'll call it "Flag" for now); It'll be useful later. Converting Score is easy; Just make this kind of statement... 1. Every .05 seconds, if Score is greater than 0, then... -Subtract 100 from Score -Add 100 to Total Score Next, you want to work on Rings. Again, simple, but you only want it to start after the Score is finished, so... 2. Every .05 seconds, if Score is equal to 0 AND Rings are greater than 0, then.. -Subtract 1 from Rings -Add 100 to Total Score Finally, we have Time. You want to set that up in a ranking system, so make several of these... 3.If Score is equal to 0 AND Rings are equal to 0 AND Time is equal to (Insert number here), then... -Add (Insert number here) to Total Score -Set Flag equal to 1 ...changing the numbers in the (Insert Number Here) to make you get higher points as you finish the level faster. Now, if you want to make the Time run down to 0 like Score and Rings did, you'll need to make a statement using Flag, like so... 4. Every .05 seconds, if Flag is equal to 1 AND Time is greater than 0, then... -Subtract 1 from Time -------------------------------- That should do it. Hope that helps. Link to comment Share on other sites More sharing options...
Zonar Games Posted July 11, 2006 Author Report Share Posted July 11, 2006 Thanks USC I'll try it out right now! Link to comment Share on other sites More sharing options...
revolutiongames2004 Posted July 16, 2006 Report Share Posted July 16, 2006 hey i posted an entire script for this Below is a double post that has been automagically merged into the original. http://sfghqmb.com/showthread.php?t=274 Link to comment Share on other sites More sharing options...
LarkSS Posted July 16, 2006 Report Share Posted July 16, 2006 I think he'd prefer to know how so he can try it out himself instead of copying a script. It could be used as a reference though. The only problem with USC's method is GM doesn't due time stuff so you can't say every 0.05 of a second, you have to use a different method, but I guess it does give the basic idea. Personally, I don't understand how people have trouble with this though... Link to comment Share on other sites More sharing options...
null1024 Posted July 17, 2006 Report Share Posted July 17, 2006 I think he'd prefer to know how so he can try it out himself instead of copying a script. It could be used as a reference though. The only problem with USC's method is GM doesn't due time stuff so you can't say every 0.05 of a second, you have to use a different method, but I guess it does give the basic idea. Personally, I don't understand how people have trouble with this though... For the time, you could have a alarm that resets every 5 steps. Link to comment Share on other sites More sharing options...
Slingerland Posted July 17, 2006 Report Share Posted July 17, 2006 Zonar, if you are still having trouble with your score card, I have a resource that was given to me by Saga the Fox (ways back...like summer '04) that taught me how to do it. If you want it, drop me a private message or instant message. Link to comment Share on other sites More sharing options...
Recommended Posts