10-21-2004 07:16
i was looking at a thread not ten minutes ago and now i can't find it. :P someone said how cool it would be to have sims like different planets with different gravity. here's a real simple script you can put in an attachment to change gravity around. i know it's probably ugly and inefficient but it works.
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.");
}
}
}