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

#1 2008-05-18 14:22:15

c0de0range
Scratcher
Registered: 2008-03-09
Posts: 16

My brain hurts . . . bad. . .

I'm working on this game and whenever I get my main character to go to a certain place
using <go to x sad   )y sad 

It somehow makes him stay there forever! I do not have a forever control piece attatched to the sprite and he just keeps on shaking in the same spot.

Offline

 

#2 2008-05-18 14:23:11

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: My brain hurts . . . bad. . .

Perhaps if you showed the script on the forums that would help.

Offline

 

#3 2008-05-18 14:26:23

c0de0range
Scratcher
Registered: 2008-03-09
Posts: 16

Re: My brain hurts . . . bad. . .

Okay, I put :

<when I receive[ message
<go to x sad -200 )y sad -61

I'm trying to get the sprite to go to the far left as if going into another room.

Offline

 

#4 2008-05-18 14:30:06

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: My brain hurts . . . bad. . .

does it have another
<when green flag clicked>
<forever>
<go to x sad   )y sad 
<end>

Thing on it? Perhaps that is the case...

Offline

 

#5 2008-05-18 14:30:34

c0de0range
Scratcher
Registered: 2008-03-09
Posts: 16

Re: My brain hurts . . . bad. . .

No, it doesn't. However, another script does.  I need a script that will work repeatedly, if activated, but not forever. Here is my current stats with a script:

<when green flag clicked>
<forever>
<if>
<touching[ main character
<change{arrowtouch  }by(1

There is an arrow in my game and whenever my main sprite touches it, the character should go to another room.

Last edited by c0de0range (2008-05-18 14:34:19)

Offline

 

#6 2008-05-18 14:49:43

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: My brain hurts . . . bad. . .

c0de0range wrote:

No, it doesn't. However, another script does.  I need a script that will work repeatedly, if activated, but not forever. Here is my current stats with a script:

<when green flag clicked>
<forever>
<if>
<touching[ main character
<change{arrowtouch  }by(1

There is an arrow in my game and whenever my main sprite touches it, the character should go to another room.

Well, I'm stumped.

Offline

 

#7 2008-05-18 15:03:24

c0de0range
Scratcher
Registered: 2008-03-09
Posts: 16

Re: My brain hurts . . . bad. . .

Nevermind, I luckily found the solution.  It turns out, the forever action won't be activated depending on how many layers a certain command is in. For example, if I put a "forever", then an "if", the "if" will be used correctly. If that "if" action activates another "if" action, then the second if action should work correctly if it is put inside the first if.

Offline

 

#8 2008-06-22 08:59:35

registeel
Scratcher
Registered: 2008-04-27
Posts: 500+

Re: My brain hurts . . . bad. . .

c0de0range wrote:

Nevermind, I luckily found the solution.  It turns out, the forever action won't be activated depending on how many layers a certain command is in. For example, if I put a "forever", then an "if", the "if" will be used correctly. If that "if" action activates another "if" action, then the second if action should work correctly if it is put inside the first if.

Now that comment hurts my brain LOL

Offline

 

Board footer