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?

Was it helpful?

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top