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

#1 2011-07-09 22:55:51

ejp03031997
New Scratcher
Registered: 2011-07-06
Posts: 2

Loading Problem with my Game

Im having trouble with my game, basically I have a player (good guy) who goes left right up down. I've made it so my player can't go up and down if touching the colour red (my platform colour) so I've added jumping pads which are yellow, and always at the begginning of my game when I press the green flag I can't go up and down, even though I'm not at all touching the red and the way how I fix it is just by going on the players script and clicking on the script :

  <when[ up ]key pressed><if><touching color[ red ] <change y by( -10 )

and then it works. Why? Why doesn't it work right from the start and why does it happen at all?
I'm not sure if it is a loading problem? It is the same on all computers I've tried it on, my home laptop and my school computer so I know it is not just the PC. So is there anything I can do to stop that? The script is not touching any other script so I know thats not a problem...

Offline

 

#2 2011-07-09 23:30:58

Harakou
Community Moderator
Registered: 2009-10-11
Posts: 1000+

Re: Loading Problem with my Game

Hey there ejp03031997, maybe you'd have better luck putting that script inside of a forever block below a green flag hat block, like this?:

Code:

when green flag clicked
forever
    if <key up pressed> and <touching color red>
        change y by -10

Clicking on a script runs it, and the key __ pressed hat blocks can be a little glitchy, so that may solve your problem.


http://www.blocks.scratchr.org/API.php?action=random&amp;return=image&amp;link1=http://i.imgur.com/OZn2RD3.png&amp;link2=http://i.imgur.com/duzaGTB.png&amp;link3=http://i.imgur.com/CrDGvvZ.png&amp;link4=http://i.imgur.com/POEpQyZ.png&amp;link5=http://i.imgur.com/ZKJF8ac.png

Offline

 

Board footer