integer gWasFlying; string gSound = "footsteps"; default { state_entry() { llSetTimerEvent(0.25); } timer() { integer NowFlying = llGetAgentInfo(llGetOwner()) & AGENT_FLYING; if (NowFlying != gWasFlying) { llStopSound(); if (NowFlying) llLoopSound(gSound, 1.0); } gWasFlying = NowFlying; } }