Monday, 25 February 2013

I decided to play around with building some vehicles in second life. Both vehicles I scripted so the user could ride them, be seated in appropriate position and spawn objects as it moved using this code segment-


integer LIFETIME    = 40; //max amount of spawns at one time
float DELAY = 0.3;     //Delay between spawns    
vector pos;
vector possAdd = <-1,0,0>; //object appears slightly behind avatar
rotation rot;
rot = llGetRot();
pos = llGetPos() + possAdd;
llRezObject("rainbow", pos, <0,0,0>, rot, LIFETIME); //change object as appropraite
llSetTimerEvent(DELAY);

Here they are in action-

 

No comments:

Post a Comment