Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //script 1
- //Assumes that the mantle is the root prim.
- integer on = TRUE;
- vector pos;
- float TICK = 0.50; // seconds per cycle.
- vector originalsize;
- vector swollensize;
- float SWELL = 1.0; // multiplier to swell up the mantle.
- vector RISE_ON_SWELL = < 0.0, 0.0, 0.50 >; // how much the jelly moves when swelled.
- vector originalpos;
- default
- {
- state_entry()
- {
- llSay(0, "Ready!");
- pos = llGetLocalPos();
- originalsize = llGetScale();
- swollensize = < originalsize.x * SWELL, originalsize.y, originalsize.z >;
- llSetTimerEvent( TICK );
- }
- on_rez( integer p )
- {
- llResetScript();
- }
- timer()
- {
- //be swollen
- llSetPos(llGetLocalPos() + <1,0,0> * llGetRot());
- llSetPrimitiveParams([PRIM_POSITION, llGetPos() + RISE_ON_SWELL ]);
- llSetPos(llGetLocalPos() + <1,0,0> * llGetRot());
- llSetPrimitiveParams([PRIM_POSITION, llGetPos() + RISE_ON_SWELL ]);
- //be originalsize
- llSetPrimitiveParams([PRIM_POSITION, llGetPos() - RISE_ON_SWELL ]);
- llSetPos(llGetLocalPos() + <1,0,0> * llGetRot());
- llSetPrimitiveParams([PRIM_POSITION, llGetPos() - RISE_ON_SWELL ]);
- llSetPos(llGetLocalPos() + <1,0,0> * llGetRot());
- }
- }
- //script 2
- vector start_pos;
- rotation start_rot;
- float delay = 0.5;
- default
- {
- state_entry()
- {
- start_pos = llGetPos();
- start_rot = llGetRot();
- llSetTimerEvent(1);
- }
- timer()
- {
- start_pos = llGetPos();
- start_rot = llGetRot();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement