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

#1 2012-12-08 08:42:53

baseball1859
Scratcher
Registered: 2012-06-09
Posts: 33

******platform Problem******

I keep getting a red outline of these blocks when I code this:

when gf clicked
if <<color red is touching black> or <color orange is touching black>>
 change x by <(xvel)*[-1]
  if <not<<color red is touching black> or <color orange is touching black>>>
   change x by <round<(xvel)/<[abs v] of (xvel)
   if <not<<color red is touching black> or <color orange is touching black>>>
    change x by <round<(xvel)/<[abs v] of (xvel)
     if <not<<color red is touching black> or <color orange is touching black>>>
      change x by <round<(xvel)/<[abs v] of (xvel)
       if <not<<color red is touching black> or <color orange is touching black>>>
        change x by <round<(xvel)/<[abs v] of (xvel)
         if <not<<color red is touching black> or <color orange is touching black>>>
          change x by <round<(xvel)/<[abs v] of (xvel)
           if <not<<color red is touching black> or <color orange is touching black>>>
            change x by <round<(xvel)/<[abs v] of (xvel)
           end
         end
       end
    end
  end
 end
 change x by <<round<(xvel)/[abs v] of (xvel)>>>*[-1]
 set xvel to [0]
end
change x by (xvel)


http://i1043.photobucket.com/albums/b437/Drax15/Random/500x150.jpg

Offline

 

#2 2012-12-08 15:21:49

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: ******platform Problem******

baseball1859 wrote:

I keep getting a red outline of these blocks when I code this:

when gf clicked
if <<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>
 change x by <(xvel)*[-1]>
  if <not<<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>>
   change x by <round<(xvel)/<[abs v] of (xvel)>>>
   if <not<<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>>
    change x by <round<(xvel)/<[abs v] of (xvel)>>>
     if <not<<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>>
      change x by <round<(xvel)/<[abs v] of (xvel)>>>
       if <not<<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>>
        change x by <round<(xvel)/<[abs v] of (xvel)>>>
         if <not<<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>>
          change x by <round<(xvel)/<[abs v] of (xvel)>>>
           if <not<<color [#ff0000] is touching [#000000]?> or <color [#ffa800] is touching [#000000]?>>>
            change x by <round<(xvel)/<[abs v] of (xvel)>>>
           end
         end
       end
    end
  end
 end
 change x by (<round<(xvel)/([abs v] of (xvel))>>*[-1])
 set [xvel v] to [0]
end
change x by (xvel)

Fixed.

Anyway, when you say that, do you mean that the scratchblocks are turning red in the Scratch program or on the forums?

Last edited by ErnieParke (2012-12-08 15:22:57)


http://i46.tinypic.com/35ismmc.png

Offline

 

Board footer