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

#1 2008-07-29 13:57:03

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Messed up script

Alright, I have no idea what i am doing wrong. But this is basically what is supposed to happen: You pick a spot, a checker checks first the left side than the right side (or vice versa) and if the spot is clear, you can move there. Than the computer goes. Here is what happens:

It works great when you have no other pieces around you. But when I have a computer piece next to me (on only 1 side), it won't let me move. Or if I'm no the edge, I can't moe (going back in). I don't know why. All I know is for some reason it isn't setting the legal_move variable to 1 so you can move. But I don't know why!

And the checker has 1 big if script (go to X Y and if touching something and than again). I can upload it if you need to look at it. The picker and checker (lol, the other two make the setup) are the trouble ones. Look at the parenthesis, those other sprites are just for setup, than "disappear"


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#2 2008-07-29 16:23:55

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Messed up script

Bluestribute wrote:

It works great when you have no other pieces around you. But when I have a computer piece next to me (on only 1 side), it won't let me move.

Is that because when it is checking the spaces, it sees something there so it doesn't like it, and won't move?


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#3 2008-07-29 16:25:56

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Messed up script

Dan01 wrote:

Bluestribute wrote:

It works great when you have no other pieces around you. But when I have a computer piece next to me (on only 1 side), it won't let me move.

Is that because when it is checking the spaces, it sees something there so it doesn't like it, and won't move?

I ave no clue. It checks the left side and right side, but if there is something there, it says you ave no moves… wait a second!!!!!!! I think I got it!!!!!!


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#4 2008-07-29 16:33:55

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Messed up script

Lol.

Hope your idea works  wink


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

#5 2008-07-29 16:35:34

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Messed up script

Dan01 wrote:

Lol.

Hope your idea works  wink

Oh yeah, it did! Here was the problem:

So, the first worked out fine, going to the right of the piece, but the next, I had an if/else block! So if IT couldn't move there, it would "tell" the piece you can't move! Fixed now


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#6 2008-07-29 16:40:25

Dan01
Scratcher
Registered: 2008-06-11
Posts: 100+

Re: Messed up script

Glad it worked out.

Does scratch have an auto save, coz I've just lost two hours of work...


http://img3.imageshack.us/img3/4743/ubd6522wp8.png
http://img3.imageshack.us/img3/4667/ubd3758ox2.png

Offline

 

Board footer