This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-10-10 17:29:43

paigehasrabiess
New Scratcher
Registered: 2012-10-10
Posts: 4

How to make a shield work right?

I've been trying to the dickens to make my character have a working shield. I have a ball, that when it hits the shield, I want to deflect and bounce randomly off screen.
I tried "If touching shield" and it seems to completly ignore that script. Or it might be conflicting with something else, I don't know.

Could someone just give me a working shield script? :c

Offline

 

#2 2012-10-10 17:40:05

awesomeness321
Scratcher
Registered: 2012-08-10
Posts: 100+

Re: How to make a shield work right?

Okay, say it's set up like this:
S=Shield|
B=Ball   |    B---------------------------------------------S
--=Ball's|
path     |
_______|           


Give the ball the script:

if <touching [shield v]>
point in direction (pick random (-100) to (120))//about, these numbers might 
  repeat (20)                                                   //    not work perfectly, but the script should.
     move (how fast you want the ball to go) steps

Last edited by awesomeness321 (2012-10-10 17:40:52)


My newest project:http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=projects&amp;type=newest&amp;return=image&amp;num=1Color:#30F9A5 I am currently http://blocks.scratchr.org/API.php?user=awesomeness321&amp;action=onlineStatus&amp;type=text

Offline

 

#3 2012-10-10 17:48:03

paigehasrabiess
New Scratcher
Registered: 2012-10-10
Posts: 4

Re: How to make a shield work right?

Hmm that didn't seem to work. I'll just try to link the game..

Offline

 

#4 2012-10-10 17:52:27

paigehasrabiess
New Scratcher
Registered: 2012-10-10
Posts: 4

Re: How to make a shield work right?

http://scratch.mit.edu/projects/paigehasrabiess/2828108
There's the game.. I'm new to the website.. so help? :c

Offline

 

#5 2012-10-10 18:57:23

paigehasrabiess
New Scratcher
Registered: 2012-10-10
Posts: 4

Re: How to make a shield work right?

bump...

Offline

 

Board footer