Discuss Scratch

RetroRoy
Scratcher
6 posts

Help

I'm making a game (don't want to be specific because I don't want to) and it has an hp system. I'm having trouble making the character die when the hp is 0, does anyone know how to fix it?
--Dovahkiin--
Scratcher
100+ posts

Help

If they are taking a lot of damage, having it check to see if their health is exactly 0 might not work. so use lower than 1
<[1] > (Health)>
and if you need more help then ask
RetroRoy
Scratcher
6 posts

Help

this is my setup for it:
when green flag clicked
wait until <><[health] < [0]>
set [ healthv] to [0]
stop [ allv]
supergamer10000
Scratcher
1000+ posts

Help

Why is the variable called “healthv”?

Ask yourself, if you were hacked and lost hours, upon hours of work, would you regret not having a strong password that only takes 5 minutes to make?

Is it time to update your password? Here are some tips to make a strong password:

Length: The longer the password, the stronger it is. A password that is at least 12 characters long.
Complexity: Combination of upper and lowercase letters, numbers, and symbols to make it harder to crack.
Uniqueness: Don't use easily guessable information like your name, address, or date of birth. Also, avoid using the same password for multiple accounts.
Passphrases: A phrase made up of random words, numbers, and symbols, as these can be easier to remember but still secure.
Randomness: Use a random password generator to create a unique and unpredictable password.
Regular updates: Regularly change your passwords to stay ahead of potential security threats.

Remember, the goal is to create a password that is strong, unique, and difficult for others to guess.

I would estimate more than 40% of scratchers have passwords that are hard to guess by a human, but easy to guess by a computer. You never know if today would be the day you lose everything.

Even if just one person was saved from losing hours and hours of work, my mission is accomplished.
RetroRoy
Scratcher
6 posts

Help

idk why, it was health in my project, idk why it added a v.
RetroRoy
Scratcher
6 posts

Help

nvm guys i fixed it
ianplus
Scratcher
34 posts

Help

RetroRoy wrote:

I'm making a game (don't want to be specific because I don't want to) and it has an hp system. I'm having trouble making the character die when the hp is 0, does anyone know how to fix it?
when green flag clicked
set [hp v] to (100)
set [died? v] to [false]
wait () secs
forever
if <<(hp) = [0]> or <(hp) < [0]>> then
if <not <(died?) = [true]>> then
set [died? v] to (true)
broadcast [chrdied v]
end
end
end

when I receive [damaged v]
change [hp v] by (-1)

Last edited by ianplus (Oct. 3, 2021 20:43:03)

Powered by DjangoBB