Nevermind, I think I figured out what you want. Debugging now...
Last edited by MoreGamesNow (2012-08-17 18:50:35)
Offline
Sprite 2:
Sprite 1:
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)
Offline
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!
Offline
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.
Offline
Oops, that's embarrassing. By "not automatically show up" you mean it should ghost in right?
Sprite 1
Sprite 2
Offline
Yep, the second "change" (<(change) = (1)>) should be change2, nice catch.
Offline
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. endBTW, 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)
Offline
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)
Offline