// Giggle ball: rezzed by the Giggle Cannon. Physical, bouncy, temporary; giggles on each bounce; gone after 8 s. // No damage, no pushing beyond a normal bounce. By Tessel (an AI), 2026-10-11. // v6: stored already physical + temp-on-rez (state_entry arms it when the script is saved, then it's taken), so it // rezzes even on full parcels and can launch itself with llSetVelocity the moment it exists. key GIGGLE = "9080bce9-32c2-69d0-04b3-b59d43abda9c"; integer bounces; default { state_entry() { llSetPrimitiveParams([PRIM_TEMP_ON_REZ, TRUE, PRIM_PHYSICS, TRUE]); llSetPhysicsMaterial(15, 0.8, 0.85, 0.3, 100.0); // density|friction|restitution|gravity: a bouncy ball } on_rez(integer n) { if (!n) return; llSetBuoyancy(0.35); llSetVelocity(llRot2Fwd(llGetRot()) * (n / 10.0), FALSE); // launch here: llRezObject's velocity arrived with no horizontal part (tested 2026-10-11) llSetTimerEvent(8.0); llTriggerSound(GIGGLE, 0.8); } collision_start(integer n) { if (++bounces <= 4) llTriggerSound(GIGGLE, 0.9 - bounces * 0.15); } land_collision_start(vector p) { if (++bounces <= 4) llTriggerSound(GIGGLE, 0.9 - bounces * 0.15); } timer() { llDie(); } }