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

#1 2013-04-27 14:59:00

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Level problems?

I have a gate that's supposed to change position for each level, so it looks like this:

when I receive [nextlvl v]
if <(level) = [4]>
go to x: (1) y: (-116)
end
if <(level) = [8]>
go to x: (47) y: (-116)
end
However, the sprite never changes position. Please help!


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

#2 2013-04-27 15:07:58

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Level problems?

Flyboy wrote:

I have a gate that's supposed to change position for each level, so it looks like this:

when I receive [nextlvl v]
if <(level) = [4]>
go to x: (1) y: (-116)
end
if <(level) = [8]>
go to x: (47) y: (-116)
end
However, the sprite never changes position. Please help!

Well, I think that this isn't a problem with the script above, but instead with your other scripts in your gate, so could I see them?

With regards,

ErnieParke


http://i46.tinypic.com/35ismmc.png

Offline

 

#3 2013-04-27 15:25:36

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Re: Level problems?

Yes.

when gf clicked
hide
wait (1) secs
forever
if<<(level)=[8]> or <(level)=[4]>>
show
else
hide
end
if<not <(y position) < [-115]>>
change y by (-0.5)  //lowers gate when not in use.
end


when I receive [rollup v] //raises the gate.
if<<(level) = [4]> and <(y position) < [-115]>>
glide (1) secs to x: (1) y: (17)
end
if<<(level) = [8]> and <(y position) < [-115]>>
glide (1) secs to x: (47) y: (17)
end


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

#4 2013-04-27 15:34:25

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Level problems?

Flyboy wrote:

Yes.

when gf clicked
hide
wait (1) secs
forever
if<<(level)=[8]> or <(level)=[4]>>
show
else
hide
end
if<not <(y position) < [-115]>>
change y by (-0.5)  //lowers gate when not in use.
end


when I receive [rollup v] //raises the gate.
if<<(level) = [4]> and <(y position) < [-115]>>
glide (1) secs to x: (1) y: (17)
end
if<<(level) = [8]> and <(y position) < [-115]>>
glide (1) secs to x: (47) y: (17)
end

Just to make sure, when you say that the gate never changes position, does that mean that it never rises during levels 4 and 8? Or, does it never go to the right position at the beginning of levels 4 and 8?

With regards,

ErnieParke

Last edited by ErnieParke (2013-04-27 15:34:55)


http://i46.tinypic.com/35ismmc.png

Offline

 

#5 2013-04-27 15:35:31

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Re: Level problems?

It never goes to the right position.


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

#6 2013-04-27 15:47:47

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Level problems?

Flyboy wrote:

It never goes to the right position.

Okay.

Anyway, are you sure that nextlvl is being broadcasted? Also, are you sure that the level is 4 or 8 when it should be?

With regards,

ErnieParke


http://i46.tinypic.com/35ismmc.png

Offline

 

#7 2013-04-27 15:49:13

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Re: Level problems?

Yeah, I'm pretty sure.  Everything else changes at 4 and 8.


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

#8 2013-04-27 16:19:52

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Level problems?

Flyboy wrote:

Yeah, I'm pretty sure.  Everything else changes at 4 and 8.

Okay, I see.

If nextlvl is being broadcasted at the right time, then the script should flash when it's being broadcasted. So, do you see the script flash at the beginning of levels 4 and 8? Sorry if this seems a bit of a repetitive question for you, though I want to be 100% sure about this.

With regards,

ErnieParke


http://i46.tinypic.com/35ismmc.png

Offline

 

#9 2013-04-27 16:24:08

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Re: Level problems?

Yes.


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

#10 2013-04-27 20:02:45

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Level problems?

Flyboy wrote:

Yes.

I have two more questions. At the end of level 3, is the gate at (1, -116) ? Also, are you sure that you want it to go to (1, -116) and not another place?

With regards,

ErnieParke


http://i46.tinypic.com/35ismmc.png

Offline

 

#11 2013-04-27 21:12:47

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Re: Level problems?

No, and I'm sure I want it to go there.


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

#12 2013-04-28 11:45:18

ErnieParke
Scratcher
Registered: 2010-12-03
Posts: 1000+

Re: Level problems?

Flyboy wrote:

No, and I'm sure I want it to go there.

Okay. I have one last final question. Are you sure that the gate is pointing in the right direction at the beginning of levels 4 and 8? Sometimes, a sprite's direction can effect it's position, which is why I'm asking.

With regards,

ErnieParke


http://i46.tinypic.com/35ismmc.png

Offline

 

#13 2013-04-28 15:06:36

Flyboy
Scratcher
Registered: 2007-12-08
Posts: 76

Re: Level problems?

Yes, I'm sure.


Remix this! http://img695.imageshack.us/img695/1689/flyboy.png-'07-today

Offline

 

Board footer