Slick Forums

Discuss the Slick 2D Library
It is currently Sun May 19, 2013 5:27 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: damage to healthbar
PostPosted: Sun Jul 01, 2012 8:03 pm 
Offline

Joined: Sun Jul 01, 2012 1:34 am
Posts: 2
Im new to slick but know some basics but I was wondering how would I go about adding a healthbar and adding damage to a weapon or character like a zombie..also how would I make a animation for bullets commingled out of a gun? I cant seem to find any documentation on slick about this.


Top
 Profile  
 
 Post subject: Re: damage to healthbar
PostPosted: Thu Jul 05, 2012 2:57 pm 
Offline

Joined: Wed Feb 15, 2012 10:17 am
Posts: 11
Jesus, how many questions do you want to add?

And Slick wont do this for you.
You still have to know Java to use slick.


Top
 Profile  
 
 Post subject: Re: damage to healthbar
PostPosted: Thu Jul 05, 2012 5:52 pm 
Offline

Joined: Thu Jan 26, 2012 5:40 pm
Posts: 79
You can use Slick's Rectangle class for a healthbar. Simply have the width reflect the percentage of health of whatever you're using it on.

As for setting a weapon's damage, wherever you have the logic that reduces HP, have it reduce it by a variable in the weapon that is attacking (so set an integer variable "damage" on each weapon).

You should probably spend more time doing more tutorials. Some good ones are found here.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group