Posted By
|
Message
|
Mr.Earthbound
Registered 15/10/2014 22:31:48
Points 7
|
21st October, 2014 at 21/10/2014 00:50:46 -
This should be really straight-foward but I've never done it before. So, let's say you have a score object. As most games do. And you wanted to reward the player, like in Sonic The Hedgehog 2 where if the user collected 100 rings he'd get 1 life. But let's say you wanted to use that with the score system instead. Like every time the player earned 100 points, you'd receive 1 life added to you current amount of lives. How could I achieve that? I suppose you'd have to have something constantly monitoring the score? lol idk. Thank God for these forums.
n/a
|
lembi2001
Registered 01/04/2005
Points 608
|
21st October, 2014 at 21/10/2014 16:22:23 -
This is where you would use the floor or ceil expressions if I recall correctly. Someone with abit more knowledge about them will be able to tell you more though.
n/a
|
siven I EAT ROCKS
Registered 03/11/2008
Points 604
|
23rd October, 2014 at 23/10/2014 00:49:25 -
well the easiest way to do that (to my knowledge) would be to have an object set up with 2 alterable values, one named LIVES, and one named POINTS.... or whatever.
Every time you pick up a coin, add 1 to the points alterable value, then have another event that checks the current value of POINTS. if the current value of POINTS is equal or greater to 100 you would add one to the LIVES value and set the POINTS value to zero. of coarse you would have to add a only one action when event loops to it. now if you wanted to keep track of them without wiping them every time you get a life simply add an extra alterable value thats called something like TOTAL POINTS and have it added to every time POINTS is added to, just dont clear it. if that makes any freakin sense that is lol. if needed ill put together an example file.
[Game design makes my brain feel like its gonna explode.]
|
s-m-r Slow-Motion Riot
Registered 04/06/2006
Points 1078
|
23rd October, 2014 at 23/10/2014 01:53:05 -
I'd totally go with siven's idea.
There are some instances where you may want to have an additional counter or flag used, such as if the first extra life is at 20,000 points and all later extra lives are awarded at 50,000 (lots of old skool arcade games were configured like this), but with a little trial and error you can make it work out all right.
Work with siven's idea first, then build off of it if you want to be more exacting or complex.
n/a
|
|
|