when x and d == some value....do this one time.

When my robot is centered(variable x) to the object, and when my distance is equaled to some amount(variable d). I would like it to drop my arm() function, do it once but redo if variables change. I can add my code but it's a bit long. If anyone wants to look at it, I willing to post it.

When my robot is centered(variable x) to the object, and when my distance is equaled to some amount(variable d). I would like it to drop my arm() function, do it once but redo if variables change.

Are you asking for permission or help? If you want permission, go ahead.

If you need help, you need to define what you need help with. Calling the function when x is equal to some value and d is equal to some value is easy:

if(x == SomeValue && d == SomeOtherValue)
{
   arm();
}

To ensure that arm() only gets called once:

bool armDone = false;

void loop()
{
   // Some stuff

   if(x == SomeValue && d == SomeOtherValue && !armDone)
{
   arm();
   ardMode = true;
}

At some point in the code, you will need to set armDone back to false, or else the arm will never move again.