Discuss Scratch

nathanjp
Scratcher
41 posts

How do I make my character invincible?

Like the topic says, how do i make my character invincible?
Jlerpy
Scratcher
1000+ posts

How do I make my character invincible?

Just don't give their sprite code to harm them?

If you mean temporarily, then have whatever you want to trigger that invincibility change a variable, then use an IF around your damage code to check if that variable is active or not.
nathanjp
Scratcher
41 posts

How do I make my character invincible?

can you show me in code?
Jlerpy
Scratcher
1000+ posts

How do I make my character invincible?

if <<touching [Bullet v] ?> and <(Invulnerabile) = [No]>> then
change (Health) by (-5)
end

FBcomics360
Scratcher
100+ posts

How do I make my character invincible?

nathanjp wrote:

Like the topic says, how do i make my character invincible?

Use this code

repeat (100)
change [ ghost] effect by (1)
end
Com_engineer_Tom
Scratcher
100+ posts

How do I make my character invincible?

FBcomics360 wrote:

nathanjp wrote:

Like the topic says, how do i make my character invincible?

Use this code

repeat (100)
change [ ghost] effect by (1)
end
they said invincible, not invisible
LE043210
Scratcher
4 posts

How do I make my character invincible?

You could just do this:
hide
or do this
change [ ghost] effect by (100)
hi_bobux725
Scratcher
100+ posts

How do I make my character invincible?

LE043210 wrote:

You could just do this:
hide
or do this
change [ ghost] effect by (100)

once again, they said invincible not invisible.

nathanjp wrote:

Like the topic says, how do i make my character invincible?

maybe try disabling the harm script by changing a variable just like what Jlerpy said
ninjacat28_
Scratcher
100+ posts

How do I make my character invincible?

nathanjp wrote:

Like the topic says, how do i make my character invincible?

when green flag clicked
forever
set [health v] to [1]
end
nathanjp
Scratcher
41 posts

How do I make my character invincible?

I have a bit of invincibility, but it freezes to be invincible, so there might be another damage. Can you see the code I made, and show me how to do it? The link to the project is https://scratch.mit.edu/projects/1222365741/ the code is in the player sprite
Jlerpy
Scratcher
1000+ posts

How do I make my character invincible?

The player sprite is freezing because you've put that wait in the middle of its loop. If you make it a separate loop, the sprite won't freeze.
nathanjp
Scratcher
41 posts

How do I make my character invincible?

Oh, ok. Do I put it in
when I receive [Hurz v]
or something else?
Jlerpy
Scratcher
1000+ posts

How do I make my character invincible?

nathanjp wrote:

Oh, ok. Do I put it in
when I receive [Hurz v]
or something else?

No, there's no need for that broadcast that I can see.
nathanjp
Scratcher
41 posts

How do I make my character invincible?

I use that broadcast for the flashing, but if i put it in a different loop, where would i put it?
nathanjp
Scratcher
41 posts

How do I make my character invincible?

can some one help me?
Jlerpy
Scratcher
1000+ posts

How do I make my character invincible?

nathanjp wrote:

I use that broadcast for the flashing, but if i put it in a different loop, where would i put it?

In its own forever loop. Here's a remix to illustrate: https://scratch.mit.edu/projects/1227342095/

Powered by DjangoBB