I am trying to make this bird take more than one hit from my bullet to die...not sure what I am doing wrong.
I have it going from birdHp=0 to birdhp=1 when hit, then when birdhp=1 and is hit again, destroy bird..
Eventsheet 1...code 287
http://www.dwbailey.com/images/birdHp.capx
Give each bird an instance variable called "HitPoints" Numbers
Set the value to 3
On collision(hit) Bird > System Subtract -1 > from Bird "HitPoints"
Bird "Hitpoints" (less than or = 0) <0 or = 0 > Bird Destroy
thanks ill try that
So now my issue is picking again. So I play it using the debugging mode. When the bullet hits the bird the var is subtracted 1 which is great..... but it doesnt store it per clone......so if i hit a bird only once it sets the hp=1 then i go to the next bird and hit it with a bullet it is destroyed because the info of the hp isnt being separated per bird.
Develop games in your browser. Powerful, performant & highly capable.
Use an instance variable on the bird instead of a global variable..
I'm also not quite sure why you'd need the pick nearest and the for each bird conditions, they don't do anything usefull here, I guess..
thanks stain. it worked, i never think about instance variables. Well I guess because never really fully understood what that was even for. I have a better understanding now. I guess i used global variable because i wanted the code to be used through out my different levels...