If Multiple things are correct, Then

Hello,

I’m having trouble getting an If statement to work. On the first frame, I want to check if all droptarget goals have been met, and if so then I want to advance the main timeline to the 2nd Frame, where I will display a completion message.

stop();
if (cookieMC._droptarget == “/cookie”, doorMC._droptarget == “/door”, babyMC._droptarget == “/baby”, carMC._droptarget == “/car”)
{
_root.gotoAndStop(2);
}

What might help this to work?

Thank you.

stop();

if (cookieMC._droptarget == "/cookie" && doorMC._droptarget == "/door" && babyMC._droptarget == "/baby" && carMC._droptarget == "/car") {
    _root.gotoAndStop(2);
}

It’s not commas :wink:

Thank you very much. That makes a lot of sense and it seems that would make it work, however it doesn’t work just yet. So in order to give you the proper context of where that code goes I will attach the FLA.

Thank you.

Not sure if you want all those arguements to be true, or either or. && means all must equate, and || means or. Also, nokrev made a typoe, be sure to change that. [AS]stop();

if (cookieMC._droptarget == “/cookie” && doorMC._droptarget == “/door” && babyMC._droptarget == “/baby” && carMC._droptarget == “/car”) {
_root.gotoAndStop(2);
}[/AS]

I knew I should’ve copied and pasted!