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

#1 2011-12-04 22:11:20

GameBot
Scratcher
Registered: 2011-07-25
Posts: 1

help

I have many games with bullets as u can see. I have bullet scripts like:

-----------------------------------------------------------------------------------
When space pressed
set (variable) to 1
  repeat until <touching color black > or <touching edge>
    move 10 steps
set (variable) to 0

----------------------------------------------------------------------------------

when flag clicked
forever
  if <(variable) = 0
    show
    go to player and piont in direction <direction of player>
  else
    hide
-----------------------------------------------------------------------------------

Now what i need help on: I want the bullet to bounce if touching the edge, BUT then if touching the edge again then don't bounce the second time. then loop when shooting again.
Plz need  help plz

Offline

 

#2 2011-12-05 10:16:27

fuz50
Scratcher
Registered: 2008-09-19
Posts: 100+

Re: help

Could you upload/link the project so we can see the script in action to help you out better?  smile


http://img10.imageshack.us/img10/7404/cooltext529102298.jpg
http://siggen.toontown-click.de/sig1.pnghttp://siggen.toontown-click.de/sig2.png

Offline

 

#3 2011-12-05 12:11:19

schusteralex2
Scratcher
Registered: 2011-09-17
Posts: 1000+

Re: help

try this and insert it into your scripts<repeat( 1)><if on edge, bounce><end>


http://i44.tinypic.com/2uj37ds.gif

Offline

 

#4 2011-12-05 12:29:01

schusteralex2
Scratcher
Registered: 2011-09-17
Posts: 1000+

Re: help

sorry forum blocks completely failed do repeat one time if on edge bounce


http://i44.tinypic.com/2uj37ds.gif

Offline

 

#5 2011-12-05 15:10:50

TRocket
Scratcher
Registered: 2009-08-18
Posts: 1000+

Re: help

hi GameBot! on your bullet you need a variable called bounced?

when space pressed
set (variable) to 0
set (bounced?) to 0
repeat until <touching colour black >or<touching edge
  if <bounced? =0>
   if on edge bounce
   move 10 steps
   set bounced? to 1
  else
   move 10 steps
set variable to 1


http://i.imgur.com/1QqnHxQ.png

Offline

 

#6 2012-01-12 12:06:15

itamaryaffe
Scratcher
Registered: 2011-05-26
Posts: 6

Re: help

I have a Sprite, which should be a crane arm
And she escapes to me when I move the second Sprite

Offline

 

#7 2012-01-12 22:10:19

kayybee
Scratcher
Registered: 2009-12-07
Posts: 1000+

Re: help

itamaryaffe wrote:

I have a Sprite, which should be a crane arm
And she escapes to me when I move the second Sprite

This doesn't make any sense.

If you have a question make your own topic as it's a different topic hence the reason to make a different topic and explain clearly so people will understand so people will be able to answer.

Offline

 

#8 2012-02-04 21:42:18

FunFanta15
New Scratcher
Registered: 2012-02-04
Posts: 1

Re: help

how do i get those aniated pics?

Offline

 

#9 2012-02-05 04:18:33

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: help

FunFanta15 wrote:

how do i get those aniated pics?

>_<
1. Don't necropost.
2. If you have a question, make a thread for it, don't ask in an unrelated thread.
._.


Why

Offline

 

Board footer