Question

I would like to know how to write this inside my hittest if statement: whenever hittest_mc y is less than the y coordinate 213, then translate hittest_mc +70.

so far I have this:

if (walk_mc.hitTestObject(goback_mc)) {
        hittest_mc.y<y==213 + 70;
}

How do I fix this?

Était-ce utile?

La solution

if (hittest_mc.y < 213)
{
    hittest_mc.y = hittest_mc.y + 70;
}

Not sure what y coord you are referring to..you mean like y on the stage?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top