The Daily Click ::. Forums ::. Klik Coding Help ::. MMF2 increasing lives by score
 

Post Reply  Post Oekaki 
 

Posted By Message

GrayFox



Registered
  09/10/2008
Points
  6
9th October, 2008 at 07:50:11 -

How can I add a new life for the player every 500, 1000, 1500, etc. points? All I can find is how to set it manually for each specific score.... is that the only way? (And yes, I'm new at this. I just started using MMF2 two days ago)

Image Edited by the Author.

 
http://www.gamersforums.net/

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th October, 2008 at 08:15:45 -

have a counter. add to it as well as the score. whenever the counter gets above 500 add a life and subtract 500 from the counter.

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
9th October, 2008 at 10:23:08 -

if counter is 500*no = add 1 live, add 1 to no

start with no=1

 
Code me a sausage!

aphant



Registered
  18/05/2008
Points
  1242
9th October, 2008 at 12:14:23 -

({score}/500)mod 500
That should give you the number of lives to add overall. To get it each 500, go with cecil64's suggestion.

 

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
9th October, 2008 at 13:08:08 -


Originally Posted by Adam Phant
({score}/500)mod 500
That should give you the number of lives to add overall. To get it each 500, go with cecil64's suggestion.



Why cecils? My doesn't require an additionall counter, just a global value, or alterable value. I think both ways are good. But there is no reason to make another counter if one suffice.

 
Code me a sausage!

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
9th October, 2008 at 19:34:31 -

Use Cecil's and ignore the others

 
n/a

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
9th October, 2008 at 22:20:57 -


Originally Posted by Canto
Use Cecil's and ignore the others



I don't want to sound rude, but it's obvius that i shouldn't be ignored since my event is better than cecils. Why should he double the events, when he can only have one. It seems pretty darn good to me, so u shouldn't tell him to ignore it, that's not cool.

 
Code me a sausage!

Cecilectomy

noPE

Registered
  19/03/2005
Points
  305

Has Donated, Thank You!VIP MemberWeekly Picture Me This Winner!Cardboard BoxGhostbuster!Pokemon Ball!ComputerBox RedSanta HatSnowman
I am an April Fool
9th October, 2008 at 23:04:34 -

don luciano yours doesnt exactly make the most sense the way youve written it. and yours requires the same ammount of extra values. i use counters. i could have just as easily used a global or an alt. its my preference.

so yes, use don lucianos but let me make it clearer.

make an alt or global value and set it to 1 at start.

-if playersPoints >= 500 x global value
+ add 1 to life
+ add 1 to global value

happy?

 
n/a

Bibin

At least 9001

Registered
  01/07/2005
Points
  308

Silver Cup WinnerGOTW Winner!Has Donated, Thank You!VIP Member
10th October, 2008 at 01:30:45 -

They both use the same amount of resources; the only difference is that Don Luciano's is a tad simpler. They both will work and function exactly the same, though.

 
n/a

aphant



Registered
  18/05/2008
Points
  1242
10th October, 2008 at 01:49:00 -

I think Don's would result in adding more than one life per score increment. It seems like when you hit 500 you'll start getting one life every tick, and then 1000 would be 2 per tick, etc etc. I like cecil's way because it would avoid this by reseting the score increment.

 

Don Luciano

Heavy combat pancake

Registered
  25/10/2006
Points
  380

VIP Member
10th October, 2008 at 12:41:58 -

it wont since the global value would add 1 to itself.

 
Code me a sausage!

Phredreeke

Don't listen to this idiot

Registered
  03/08/2002
Points
  4504

You've Been Circy'd!VIP MemberPS3 Owner
13th October, 2008 at 10:53:15 -

I've used Don Luciano's way on some of my old games

 
- Ok, you must admit that was the most creative cussing this site have ever seen -

Make some more box arts damnit!
http://create-games.com/forum_post.asp?id=285363

GrayFox



Registered
  09/10/2008
Points
  6
14th October, 2008 at 07:23:10 -

I don't really have much else to say, but thanks for the tips!

 
http://www.gamersforums.net/
   

Post Reply



 



Advertisement

Worth A Click