Discuss Scratch

bunnymustard
Scratcher
500+ posts

Projectiles going through walls

I need help with a script for scratch 1.4, to make a wall to stop projectiles for my upcoming game
cookiegr
Scratcher
100+ posts

Projectiles going through walls

So are you wanting to make a wall or is your projectile going through walls?

bunnymustard
Scratcher
500+ posts

Projectiles going through walls

I want to make the wall that thay cant go through
cookiegr
Scratcher
100+ posts

Projectiles going through walls

Just draw the wall in one color in a new stage, and put one of these scripts in :

If touching <color of wall>
point in direction <opposite of the one sprite is going in>
change x or y by <opposite of your current direction>

The above one is a bit complicated to explain however, so you could just use:

If touching <color or wall>
move -10 steps

If the wall just surrounds the edges, you can use the script:
If on edge, bounce

bunnymustard
Scratcher
500+ posts

Projectiles going through walls

Ok!
bunnymustard
Scratcher
500+ posts

Projectiles going through walls

But, i need 3d walls
cookiegr
Scratcher
100+ posts

Projectiles going through walls

Oh then I guess you could make the wall a seperate sprite instead and make it if touching sprite

Powered by DjangoBB

Standard | Mobile