Ummm Im doing like a drag and drop dress up game thing, but the drag and drop thing is like...well when you try to drag something then ALL of the clothes and stuff go to your mouse cursor! what did I do wrong?
I scripted it like this:
when flag clicked:
set dragndrop to: 0
forever if dragndrop=1
go to mouse pointer
when sprite clicked
if dragndrop= 0
set dragndrop to 1
else
set dragndrop to 0
did I do it right?
CHEERS
******14**YR**OLD******Dirgy
-------------------------------------------------------------
Door: whats your name?
Richard: Richard. Richard Meyhew. Dick.
Door: Well hello richardrichardmeyhewdick!
---------------------------------------------------------------
Offline
Not right. A much simpler script is:
When green flag clicked
forever if touching mouse pointer and mouse down?
repeat until not touching mouse pointer
go to mouse pointer
Another way is:
When green flag clicked
forever if touching mouse pointer and mouse down?
set dragging to 1
repeat until not touching mouse pointer
go to mouse pointer
set dragging to 0
Hope it helps
Offline
Oops, this may take a lot of explaining but it's better if:
When green flag clicked
forever if touching mouse pointer and mouse down?
set dragging to 1
repeat until not mouse down
go to mouse pointer
set dragging to 0
Offline
Nah you dont even need a variable but Greatdane's first script won't work. You'll need:
When F Clicked,
Forever if <<touching mouse pointer> AND <mouse down>>
Repeat until <not <mouse down>>
Go to mouse pointer.
That is the basic drag and drop script, when it is clicked and the mouse button is held is will follow the mouse and only that.
The problem with your script was that it had a single variable controlling all the clothes, they ALL reacted when you clicked on one because they were all responding to the same variable.
Offline
To avoid picking up multiple things, I think you will need a variable.
WHEN Sprite1 clicked
IF (Dragging)=0
--Set (Dragging) to 1
--Repeat Until NOT Mousedown
----Goto Mousepointer
--Set Dragging to zero
-- indicates command is inside the "IF" block
---- indicates the command is inside the "Repeat" block.
Offline
when sprite clicked
repeat until mouse down
goto mousepointer
this does not pickup more than one but you have to click and hold the mouse and drag away from the sprite to release.
Offline