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

#1 2012-07-28 11:58:06

The_Scratch
Scratcher
Registered: 2012-04-19
Posts: 100+

Needed: Hands on help!

Im making a game called game creator, (http://scratch.mit.edu/projects/TheScratchTest/2701241) After finally getting the player to fall, I come upon a new glitch. If you look at the codes, You'll see the terrain, start flag and finnish flag must go to the mouse pointer when their option blocks are clicked. However, when I click the option block, instead of going to my mouse pointer the object I wish to use goes to somewhere else, as if it were preset. However, I did some testing and found something strange. If you use it while downloaded, (where the glitch still exists) and you have the terrain sprite window open as you play, it works again! (This happens for the flags, too.) So, I'm hoping I can get some help as to why this glitch is happening, and what I can do to fix it. (If you're going to use the scratchblocks forum thing keep the blocks simple!)


when gf clicked
say [HELP ME OR I WILL EXPLODE!]


Little known fact. You are acting cray cray.
http://24.media.tumblr.com/tumblr_mc0udwsMCj1r3l41yo1_400.gif

Offline

 

#2 2012-07-30 09:25:11

Smozzick
Scratcher
Registered: 2011-10-23
Posts: 100+

Re: Needed: Hands on help!

Ok...so, firstly, the locations that they are appearing at are where they actually are - it's only doing the 'show' part of the script.

Now I've found out why that happens.

Basically when you click on it's options button it runs the script but the mouse it still down...so to fix it you just need to add at the top of the When I Receive Terrain and other such blocks a Wait Until not mouse down? block.

---

The Fix

Looks like this:

wait until <not (mouse down?)>
Put it at the top of the following scripts just under these hats:


When I receive [Terrain v]

When I receive [Start v]

When I receive [Finish v]
---

Why it worked offline

Java player is slower than flash player so when you clicked once in java it took long enough that it registered that you had released the left mouse button before checking if you had.

Last edited by Smozzick (2012-07-30 09:33:15)


http://i50.tinypic.com/ded8m.png

Offline

 

#3 2012-08-04 15:21:18

The_Scratch
Scratcher
Registered: 2012-04-19
Posts: 100+

Re: Needed: Hands on help!

Thanks I'll try it!


Little known fact. You are acting cray cray.
http://24.media.tumblr.com/tumblr_mc0udwsMCj1r3l41yo1_400.gif

Offline

 

Board footer