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

#1 2012-03-14 07:58:40

wiesner
New Scratcher
Registered: 2012-03-14
Posts: 2

Problems with scratch

hey guys im using scratch for my GCSE ICt and am having problems with a few things i was wondering if any one could help.

theres a major problem with my game. its similar to a mario game but when he jumps too far he starts to glide through the brick rather than just bump off it and fall again.i was wondering if anyone would know how to fix this as its pretty important and i dont really have time to make a diffrent game.

Offline

 

#2 2012-03-14 08:28:34

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Problems with scratch

Try reducing the speed at which he falls.

Offline

 

#3 2012-03-14 18:23:24

trinary
Scratcher
Registered: 2012-01-29
Posts: 1000+

Re: Problems with scratch

Could you post the scripts you are using?


http://trinary.tk/images/signature_.php

Offline

 

#4 2012-03-15 11:19:35

wiesner
New Scratcher
Registered: 2012-03-14
Posts: 2

Re: Problems with scratch

[scratchblocks]
when gf clicked
forever
if <key (left arrow) pressed?>
  [change x by] (-3)
if <key (right arrow) pressed?>
  [change x by] (3)
if <key (space) pressed?>
  if <touching colour [green]>
   if <jumping = [0] >
    [set (jumping) to (1)]
      repeat (20)
       [change y by] (2)
        [change (jumping) to (0) ]



hope i did it right :S

Offline

 

#5 2012-03-15 11:25:23

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Problems with scratch

wiesner wrote:

when gf clicked
forever
 if <key (left arrow) pressed?>
  change x by (-3)
 end
 if <key (right arrow) pressed?>
  change x by (3)
 end
 if <key (space) pressed?>
  if <touching color [#0A8A14]?>
   if <(jumping) = [0] >
    set [jumping v] to (1)
    repeat (20)
      change y by (2)
      set [jumping v] to (0)
    end
   end
  end
 end
hope i did it right :S

Fixed the scratchblocks for you.

Try adding this to the bottom:

if <not <touching color [#0A8A14]?>>
change y by (-1)
end

Last edited by scimonster (2012-03-15 11:26:53)

Offline

 

#6 2012-03-18 03:41:17

youtube_com
New Scratcher
Registered: 2012-03-17
Posts: 4

Re: Problems with scratch

how exactly do i get a scratch playing the nim game to take out the stone from the piles.what script would be suitable to subtract the number of stones from the pile

Offline

 

#7 2012-03-18 05:19:37

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

Re: Problems with scratch

youtube_com wrote:

how exactly do i get a scratch playing the nim game to take out the stone from the piles.what script would be suitable to subtract the number of stones from the pile

Please make a new thread when you have an unrelated question.


Why

Offline

 

#8 2012-03-19 15:18:56

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Problems with scratch

youtube_com wrote:

how exactly do i get a scratch playing the nim game to take out the stone from the piles.what script would be suitable to subtract the number of stones from the pile

Althrough you should make your own thread, I'll try to answer for you.

What would be best to count the number of stones left is using a variable: So when you want to take out a stone from a pile, subtract one from the variable.

If you want the stones to show graphically as an image, that's a different matter -- you could clear, stamp in different positions for the amount of stones, and when it is time to redraw the stone pile, clear again and repeat the process, but that'd be slow. You could also use a different sprite for every stone, but that'd use too much sprites and scripts if the stone limit is too high.

Offline

 

Board footer