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

#1 2010-07-14 08:52:26

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

1s1s Two Player Messup

I am working on a one sprite, one script two player game. There is one player, a black stickman, and another, a white stickman. I can't really describe things, so here is a picture of the stage:

http://i27.tinypic.com/70cbqc.png

It's said that one picture is worth a thousand words, so I hope that puts a good image of the game play in your head. When the white player jumps, it goes down.

Now for the real part that this thread was made for: the problem, the (personificationally speaking:) antagonist, the issue:

When ever the black stickman jumps, he doesn't come down. He just stays in the air. But I just copied the black stickman's part of the script an put them in for the white stickman parts of the script and changed the variables to match. I can't figure out what I'm doing wrong.

Here is the script:

(remember, this is a 1s1s)

THE VARIABLE KEY:
B=Black Stickman
W=White Stickman
X=X Position
Y=Y Position
V=Velocity.

http://i30.tinypic.com/10x63bk.gif

Why doesn't he go down? I feel like this will be one of those dumb questions with a simple answer that I can't seem to figure out.

EDIT: Here is a link to my test account's project: pu ssem reyalp owt. (two player mess up backwards)

HENLEYTEST'S PROJECT

Last edited by henley (2010-07-14 09:05:15)


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#2 2010-07-14 09:07:29

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: 1s1s Two Player Messup

henley wrote:

I am working on a one sprite, one script two player game. There is one player, a black stickman, and another, a white stickman. I can't really describe things, so here is a picture of the stage:

http://i27.tinypic.com/70cbqc.png

It's said that one picture is worth a thousand words, so I hope that puts a good image of the game play in your head. When the white player jumps, it goes down.

Now for the real part that this thread was made for: the problem, the (personificationally speaking:) antagonist, the issue:

When ever the black stickman jumps, he doesn't come down. He just stays in the air. But I just copied the black stickman's part of the script an put them in for the white stickman parts of the script and changed the variables to match. I can't figure out what I'm doing wrong.

Here is the script:

(remember, this is a 1s1s)

THE VARIABLE KEY:
B=Black Stickman
W=White Stickman
X=X Position
Y=Y Position
V=Velocity.

http://i30.tinypic.com/10x63bk.gif

Why doesn't he go down? I feel like this will be one of those dumb questions with a simple answer that I can't seem to figure out.

I seriously can't work this one out, it looks right, im not very good at this kind of thing, Im thinking has something to do with the *0.9 but I don't see why that wouldn't work, I'vejust checked it on my calculator but it works both ways, so sorry but I'm no help.


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#3 2010-07-14 09:15:51

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: 1s1s Two Player Messup

markyparky56 wrote:

I seriously can't work this one out, it looks right, im not very good at this kind of thing, Im thinking has something to do with the *0.9 but I don't see why that wouldn't work, I've just checked it on my calculator but it works both ways, so sorry but I'm no help.

The 0.9 is on both the black and white, and it's for movement, not jumping.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#4 2010-07-14 09:46:57

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: 1s1s Two Player Messup

Oh, I think i've spotted it!

Black doesn't have the

[blocks]<if>   <not>  <touching color[ ◘ ]  >>
<change{ BYV  }by( 1/-1 )
<end>
[/blocks]
script!

Last edited by markyparky56 (2010-07-14 09:47:10)


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#5 2010-07-14 11:22:49

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: 1s1s Two Player Messup

markyparky56 wrote:

Oh, I think i've spotted it!

Black doesn't have the

[blocks]<if>   <not>  <touching color[ ◘ ]  >>
<change{ BYV  }by( 1/-1 )
<end>
[/blocks]
script!

Good observation! But, if I do that, instead of just not coming down, it keeps on going upward.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#6 2010-07-14 11:23:30

markyparky56
Scratcher
Registered: 2008-03-20
Posts: 1000+

Re: 1s1s Two Player Messup

henley wrote:

markyparky56 wrote:

Oh, I think i've spotted it!

Black doesn't have the

[blocks]<if>   <not>  <touching color[ ◘ ]  >>
<change{ BYV  }by( 1/-1 )
<end>
[/blocks]
script!

Good observation! But, if I do that, instead of just not coming down, it keeps on going upward.

Even if its -1?


http://j.mp/jgVnTq
Check out my game engine development site: NewDawn I'm a Level 171 Scratcher.I am http://bit.ly/nkvLNT

Offline

 

#7 2010-07-14 11:28:37

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: 1s1s Two Player Messup

markyparky56 wrote:

henley wrote:

markyparky56 wrote:

Oh, I think i've spotted it!

Black doesn't have the

[blocks]<if>   <not>  <touching color[ ◘ ]  >>
<change{ BYV  }by( 1/-1 )
<end>
[/blocks]
script!

Good observation! But, if I do that, instead of just not coming down, it keeps on going upward.

Even if its -1?

Yes. I tried both.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#8 2010-07-14 11:46:34

Sperry
Scratcher
Registered: 2010-03-09
Posts: 500+

Re: 1s1s Two Player Messup

You did change it to black, not white didnt you?


http://img709.imageshack.us/img709/3252/gobanim2.gifhttp://ls.gd/bo

Offline

 

#9 2010-07-14 12:02:54

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: 1s1s Two Player Messup

Sperry wrote:

You did change it to black, not white didnt you?

Of course!


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#10 2010-07-14 12:12:20

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: 1s1s Two Player Messup

You need to go to the BLACK's position when testing for colors, right now (because the white is drawn last) it's at the WHITE's position. I just put this:

[clear]
[switch to costume black]
[go to bx by]
... (detection
[stamp]
[switch to costume white]
[go to wx wy]
... (detection
[stamp]

Last edited by nXIII (2010-07-14 12:12:59)


nXIII

Offline

 

#11 2010-07-14 12:59:55

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: 1s1s Two Player Messup

I fixed it! (sorry nXIII I tried that and I'm pretty sure it doesn't work) it turns out that color sensing doesn't work, so you have to do it with the variables.

here it is


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#12 2010-07-14 13:02:50

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: 1s1s Two Player Messup

ScratchReallyROCKS wrote:

I fixed it! (sorry nXIII I tried that and I'm pretty sure it doesn't work) it turns out that color sensing doesn't work, so you have to do it with the variables.

here it is

You are wrong.

http://scratch.mit.edu/projects/nXIII/1191200

Last edited by nXIII (2010-07-14 13:06:15)


nXIII

Offline

 

#13 2010-07-14 13:09:33

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: 1s1s Two Player Messup

nXIII wrote:

ScratchReallyROCKS wrote:

I fixed it! (sorry nXIII I tried that and I'm pretty sure it doesn't work) it turns out that color sensing doesn't work, so you have to do it with the variables.

here it is

You are wrong.

http://scratch.mit.edu/projects/nXIII/1191200

Oh, I see, you put the stamp blocks in a different place than I did when I tried it. Well, your way doesn't work any better than mine and my way doesn't work any better than yours, so I guess he could use either.


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#14 2010-07-14 13:12:03

nXIII
Community Moderator
Registered: 2009-04-21
Posts: 1000+

Re: 1s1s Two Player Messup

ScratchReallyROCKS wrote:

nXIII wrote:

ScratchReallyROCKS wrote:

I fixed it! (sorry nXIII I tried that and I'm pretty sure it doesn't work) it turns out that color sensing doesn't work, so you have to do it with the variables.

here it is

You are wrong.

http://scratch.mit.edu/projects/nXIII/1191200

Oh, I see, you put the stamp blocks in a different place than I did when I tried it. Well, your way doesn't work any better than mine and my way doesn't work any better than yours, so I guess he could use either.

My way works better because the stage isn't always flat, it can have objects in it. your way doesn't work with color sensing.


nXIII

Offline

 

#15 2010-07-14 13:20:43

ScratchReallyROCKS
Scratcher
Registered: 2009-04-22
Posts: 1000+

Re: 1s1s Two Player Messup

nXIII wrote:

ScratchReallyROCKS wrote:

Oh, I see, you put the stamp blocks in a different place than I did when I tried it. Well, your way doesn't work any better than mine and my way doesn't work any better than yours, so I guess he could use either.

My way works better because the stage isn't always flat, it can have objects in it. your way doesn't work with color sensing.

Yeah, that's true.

So, henley, are you going to make a game out of this?


http://imageshack.us/a/img694/3806/sigmad.png

Offline

 

#16 2010-07-14 13:53:30

henley
Scratcher
Registered: 2008-06-21
Posts: 1000+

Re: 1s1s Two Player Messup

Yay! It's fixed! And yes ScratchReallyROCKS, I am making a game out of it. I am using nXIII's way because it works faster, and the variables are confusing me.

Well, I guess there is no need for this topic anymore.


"I've worked so hard for you and you give me nothing in return. Do you need help... Or do I?"

Offline

 

#17 2010-07-14 13:58:37

Wolfie1996
Retired Community Moderator
Registered: 2009-07-08
Posts: 1000+

Re: 1s1s Two Player Messup

henley wrote:

Well, I guess there is no need for this topic anymore.

Closing  big_smile


"...Jargon - the practice of never calling a spade a spade, when you might instead call it a manual earth-restructing implement..." - Bill Bryson, Mother Tongue

Offline

 

Board footer