
CODE
integer on;
float gravity = 0.7; // between 0.5 and 0.8 work well for low gravity. anything higher
// is annoying and 1.0 is zero-gee bouncy bouncy (and dangerous).
default {
on_rez(integer parameter) {
llResetScript();
}
state_entry() {
llSetStatus(STATUS_PHYSICS, FALSE);
llSetBuoyancy(0.0);
on = FALSE;
}
touch_start(integer total_number) {
if (!on) {
llSetStatus(STATUS_PHYSICS, TRUE);
llSetBuoyancy(gravity);
on = TRUE;
llWhisper(0, "Low gravity on.");
} else {
llSetStatus(STATUS_PHYSICS, FALSE);
llSetBuoyancy(0.0);
on = FALSE;
llWhisper(0, "Low gravity off.");
}
}
}