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

#1 2012-08-17 17:26:39

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

What's wrong with the project?

It won't work.
Darkness isn't working!

(My latest project for more info  smile )

Offline

 

#2 2012-08-17 17:42:37

41w4y5
Scratcher
Registered: 2012-08-15
Posts: 100+

Re: What's wrong with the project?

What's it supposed to do?


http://i.imgur.com/Em1YC.png

Offline

 

#3 2012-08-17 17:48:27

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

Re: What's wrong with the project?

Um, well, umm, I'm not so sure that you could help me, because you don't know anything about it.

It's a platformer.

Offline

 

#4 2012-08-17 18:48:21

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

Nevermind, I think I figured out what you want.  Debugging now...

Last edited by MoreGamesNow (2012-08-17 18:50:35)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#5 2012-08-17 18:56:55

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

Sprite 2:
http://i48.tinypic.com/m9un9j.gif

Sprite 1:
http://i49.tinypic.com/1tprie.gif

You can probably remove the second "set [ghost v] effect to (0)" block in sprite 1.  I added it, but it isn't needed (as you probably already knew, seeing as it wasn't there to begin with xD).  You may have noticed I eliminated a script.  That was intentional.

Last edited by MoreGamesNow (2012-08-17 18:59:09)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#6 2012-08-17 18:57:11

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: What's wrong with the project?

Thanks, MoreGamesNow, for helping us. We'll be sure to pay you back by putting TONS of credits to you.

Last edited by coolhogs (2012-08-17 18:58:15)


Get ready for domination of:  tongue

Offline

 

#7 2012-08-17 19:05:59

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

Three more things:

The most important change I made to Sprite1's script was changing the "repeat (5)" to "repeat (4)".  It's something I'd overlook, so I'm just letting you  know.

The "<mouse down?> AND <touching [mouse pointer]?>" combo is okay at simulating "when sprite clicked", but it has one glitch: when you hold down your mouse and move it over the button.

The second "set [ghost v] effect to (0)" in the sprite 1 scripts is a change that I made that really isn't necessary (as you, GoldTube, probably knew when you first wrote the script that the changes in the ghost effect cancel out).  You can remove it if you want.

@coolhogs:  I won't refuse credit, but don't sell yourselves short to give me it!  smile


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#8 2012-08-17 19:19:12

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: What's wrong with the project?

Sorry, but that's not what we're looking for. The "darkness" costume of Sprite 2 does not appear, when I played the scripts. It's supposed to show when the play appears. Also, the menu, and the "In a time of darkness..." should not automatically show up.


Get ready for domination of:  tongue

Offline

 

#9 2012-08-17 21:02:10

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

Oops, that's embarrassing.  By "not automatically show up" you mean it should ghost in right?

Sprite 1

http://i45.tinypic.com/34hjeo9.gif

Sprite 2

http://i48.tinypic.com/2i0ynmw.gif


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#10 2012-08-18 09:42:45

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: What's wrong with the project?

Thanks, but for sprite 2, did you mean variable "change2", instead of "change"?


Get ready for domination of:  tongue

Offline

 

#11 2012-08-18 10:32:54

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

Yep, the second "change" (<(change) = (1)>) should be change2, nice catch.


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#12 2012-08-18 21:39:41

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: What's wrong with the project?

Could you help us? The project on my account isn't working.

It's not broadcasting the finale.


Get ready for domination of:  tongue

Offline

 

#13 2012-08-18 22:29:52

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

So, I think what is happening is that my script is "bouncing" player off of the red dot faster than the "forever: if <touching color [red]>: broadcast [finale v];;" script is running through (I'm pretty sure that scratch tries to loop through every forever loop at the same speed, so really short scripts take just as long as longer loops).  The simple solution is making the red circle a different sprite.  Alternatively, you can stick an "if touching [red]" into the movement script whenever it is detecting a collision.

forever
if on edge, bounce
if<key [right arrow v] pressed?>
change [x-vel v] by (0.2)
end
if<key [left arrow v] pressed?>
change [x-vel v] by (0.2)
end
change x by (x-vel)
if<touching [wall/floor v]?>
if<touching color [#FF0000]?>
broadcast [finale v]
end
set[x-vel v] to ((-0.5)*(x-vel))
change x by (x-vel)
if<touching [wall/floor v]?>
change x by (x-vel)
end
etc.
end
change y by (y-vel)
if <touching [wall/floor v]?>
if <touching color [#FF0000]?>
broadcast [finale v]
end
set [x-vel v] to ((0.94)*(x-vel))
set [y-vel v] to ((-0.5)*(y-vel))
change y by (y-vel)
etc.
end
BTW, you shouldn't have the "and (y-vel)<[0]" bit for the basic jumping (the second "if [key up v] pressed?" block).  You don't really need it for the first one either, it just depends on what kind of conditionals you want for wall jumping.

Last edited by MoreGamesNow (2012-08-19 17:05:54)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

#14 2012-08-19 16:39:17

coolhogs
Scratcher
Registered: 2011-07-26
Posts: 1000+

Re: What's wrong with the project?

still not working...  hmm


Get ready for domination of:  tongue

Offline

 

#15 2012-08-19 17:06:31

MoreGamesNow
Scratcher
Registered: 2009-10-12
Posts: 1000+

Re: What's wrong with the project?

Which approach did you take?

And are you still bouncing off of the red dot, or is it just not broadcasting "finale"?

Last edited by MoreGamesNow (2012-08-19 17:06:50)


http://images2.layoutsparks.com/1/218929/rubiks-cube-animated-rotating.gif
"Cogito ergo sum" --  I think, therefore I am

Offline

 

Board footer