void Move()
{
static bool Moving = false;
if (dbRightKey())
{
//< Moving Stuff>
if (dbSoundPlaying(<ID>)){dbLoopSound(<Id>);}
Moving = true;
}
if (dbLeftKey())
{
//< Moving Stuff>
if (dbSoundPlaying(<ID>)){dbLoopSound(<Id>);}
Moving = true;
}
if (dbUpKey())
{
//< Moving Stuff>
if (dbSoundPlaying(<ID>)){dbLoopSound(<Id>);}
Moving = true;
}
if (dbDownKey())
{
//< Moving Stuff>
if (dbSoundPlaying(<ID>)){dbLoopSound(<Id>);}
Moving = true;
}
if (Moving==false){dbStopSound(<ID>);}
}
That a basic idea of it.
Problem Solution That Never Fails: "Build A Bridge And Get Over It"