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
Try reducing the speed at which he falls.
Offline
[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
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 endhope 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
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
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.
Offline
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