This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-05-31 20:47:19

MossStar10
Scratcher
Registered: 2010-05-30
Posts: 23

Life points?

Im working on a pokemon game but I dont Know how to make the pokemom have lifepoints.Please help me!

Offline

 

#2 2010-05-31 20:51:24

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: Life points?

Do you mean a life bar, HP, or both. I can make a life bar, and I can make HP but I can't make both.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#3 2010-05-31 21:34:42

MossStar10
Scratcher
Registered: 2010-05-30
Posts: 23

Re: Life points?

A life bar I think....

Offline

 

#4 2010-05-31 21:45:02

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: Life points?

Maybe this project by tutorial_maker can help you out - it gives you the scripts right up-front about health meters  smile

Offline

 

#5 2010-06-01 18:19:03

MossStar10
Scratcher
Registered: 2010-05-30
Posts: 23

Re: Life points?

That didnt help much......
Someone help I also need help with causing damage!

Offline

 

#6 2010-06-01 18:21:08

johnnydean1
Scratcher
Registered: 2010-02-12
Posts: 1000+

Re: Life points?

Look at my 1: http://scratch.mit.edu/projects/johnnydean1/1023171
It has a b/w health bar in it from pokemon. And I made a PKMN game here: http://scratch.mit.edu/projects/johnnydean1/993357


You can now reach me on Twitter @johnnydean1_

Offline

 

#7 2010-06-01 19:40:02

MossStar10
Scratcher
Registered: 2010-05-30
Posts: 23

Re: Life points?

I cant downloadany more things.....
Could sokeone just tell me how?

Offline

 

#8 2010-06-02 17:30:51

MossStar10
Scratcher
Registered: 2010-05-30
Posts: 23

Re: Life points?

Can somone use the blocks to show me?

Offline

 

#9 2010-06-02 19:28:48

infinitum3d
Scratcher
Registered: 2009-05-10
Posts: 100+

Re: Life points?

MossStar, is your project uploaded? If so, I can download it and try to help you.

To make HEALTH, you could create a variable (and name it health),
then you could have a sprite (called HealthBar) with multiple costumes. 

Set health to, say, 100.
Set costume to "100 Health Costume"

<when green flag clicked>
<set{ health  }to( 100 )
<switch to costume[ 100 Health ]


When something happens to cause you to lose health, CHANGE health by (-10),
<change{ health  }by( -10 )


and Forever, if health=90
change costume to "90 Health Costume"

<forever>
<if><( <{ health  }> <=> 90 )>
<switch to costume[ 90 Health ]>


Forever, if health=80
change costume to "80 Health Costume"

Forever, if health=70
change costume to "70 Health Costume"

etc, etc, etc.

That's one way to do it.

Last edited by infinitum3d (2010-06-02 19:33:18)

Offline

 

#10 2010-06-02 19:34:56

infinitum3d
Scratcher
Registered: 2009-05-10
Posts: 100+

Re: Life points?

A more efficient way could be;

<switch to costume[ <{ health  }> >

Last edited by infinitum3d (2010-06-02 19:35:49)

Offline

 

#11 2010-06-02 19:42:43

infinitum3d
Scratcher
Registered: 2009-05-10
Posts: 100+

Re: Life points?

I made one. Took 5 minutes. Here's a link to it.

Simple Health Bar

Hope it helps!

Last edited by infinitum3d (2010-06-02 19:43:44)

Offline

 

#12 2010-06-02 20:22:05

MossStar10
Scratcher
Registered: 2010-05-30
Posts: 23

Re: Life points?

Thanks for the help ive been looking everywere fore an awnser:D!Can you tell me how to cause damage?

Offline

 

Board footer