Hello, I would ask you one question please.
I'm doing now a game in scratch.. it's about 3 boxes in the left, and the player have to drag and drop it in the right place.
I want if the player drag and drop the first and the second in the third box in the right place, then switch background custom and show sprite"you win!".
but I have a problem, i programmed as:
if "box1" touching (yepbox1).. set variable to 1
if "box2" touching (yepbox2).. set variable to 2
if "box3" touching (yepbox3).. set variable to 3
if variable = 3 go to change box's custom
then
if "box1" touching (color#).. set variable to 4
if "box2" touching (color#).. set variable to 5
if "box3" touching (color#).. set variable to 6
if variable = 6 go to change broadcast "the end"
the problem is: if the player first drag and drop box3, the variable will be 6 and the will end with out dragging and dropping the box1&2!!
And thank you.
Offline
Anyway,
if "box1" touching (yepbox1).. set variable to 1
if "box2" touching <(yepbox2) and <(Variable)=1> >THIS MAKES SURE THEY HAVE TO PLAC E IN box1 FIRST!.. set variable to 2
if "box3" touching (yepbox3) and <(variable)=2> .. set variable to 3
if variable = 3 go to change box's custom
then
if "box1" touching <(color#) and <(variable)=3> >.. set variable to 4
if "box2" touching <(color#) and <(variable)=4> >.. set variable to 5
if "box3" touching <(color#) and <(variable)=5> >.. set variable to 6
if variable = 6 go to change broadcast "the end"
This is the code you need to use, it' detects the previous setting of the variable
Offline
this: http://scratch.mit.edu/projects/GameDesigner/1726264
but I don't want from the player to drag and drop box1 then box2 then box3
I want if he drag and drop any box (1 or 2 or 3) but should drag and drop all the boxes
Offline