Background information
Like I have stated before here, I am trying to create a Plants vs. Zombies mod in Scratch. My main concern still seems to be attempting to create the drag-and-drop system (clicking the seed packet and then dragging and dropping it), however, the problem still seems to be the same, for example, in the editor, I can only drag the seed packet, and in preview mode, I can't drag anything.
What I have tried (scratchblocks format)
When I have clicked the seed packet
[scratchblocks]
when this sprite clicked
Greater than or equal to ([peashooter cost v]) (100)
[/scratchblocks]
To define Greater than or equal to (var) (number)
[scratchblocks]
define Greater than or equal to (var) (number)
if <<[(var)] > [(number)]> or <[(var)] = [(number)] then
broadcast [message 1 v]
else
end
[/scratchblocks]
The code for when the seed packet sends the message to the specific plant
[scratchblocks]
when I receive [message 1 v]
create clone of [myself v]
[/scratchblocks]
The code for dragging and dropping the clone
[scratchblocks]
when I start as a clone
if <<mouse down?>> = [false]> then
forever
show
set [brightness v] effect to (40)
go to x: (mouse x) y: (mouse y)
end
else
delete this clone
end
[/scratchblocks]
Note that unlike last time, I have, in fact, initialized the cost for the Peashooter:
My question
What am I doing wrong that would still cause the code to be like this?