Discuss Scratch

Remixer2-0
Scratcher
42 posts

health damage

I don't know how to make the player in my game take damage form enemy's and to make the enemy deal a certain amount of damage
qloakonscratch
Scratcher
1000+ posts

health damage

Remixer2-0 wrote:

I don't know how to make the player in my game take damage form enemy's and to make the enemy deal a certain amount of damage
This depends. Do they shoot lasers or something? If so, just make it so if the lasers touch the player, they takes damage.




Now Showing: CCRP V
https://scratch.mit.edu/studios/33864948/


Coding on Scratch since 2013

Foruming since 2016

In the Forum Helpers since 2022
Remixer2-0
Scratcher
42 posts

health damage

qloakonscratch wrote:

Remixer2-0 wrote:

I don't know how to make the player in my game take damage form enemy's and to make the enemy deal a certain amount of damage
This depends. Do they shoot lasers or something? If so, just make it so if the lasers touch the player, they takes damage.
I mean when the enemy collides into the player
Remixer2-0
Scratcher
42 posts

health damage

and also how to make the player take damage so then the health bar goes down until the game over screen appears when they die
91093673
Scratcher
33 posts

health damage

forever
if <touching [Enemy v] ?> then
change [playerHealth v] by (-1)
end
end

forever
wait until <(playerHealth) < [1]>
broadcast [GAME OVER v]
end

Last edited by 91093673 (Dec. 20, 2021 18:40:24)


Scratch member for around 7 years.

Powered by DjangoBB