Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer CHANNEL=100;
- key ID;
- float ANGOLO=45;
- float MASSA;
- float VELOCITA=5;
- display()
- {
- llSetColor(<1,0.6,0.6>,ALL_SIDES);
- llSetRot(llEuler2Rot(<0,DEG_TO_RAD*(90-ANGOLO),0>));
- llSetText("Angolo: "+(string)ANGOLO+",\n Vel: "+(string)VELOCITA,<1,1,1>,1);
- llSetColor(<0.5,0.5,0.5>,ALL_SIDES);
- }
- default
- {
- state_entry()
- {
- display();
- llSay(0, "Script running");
- llListen(100,"",NULL_KEY,"");
- }
- listen(integer channel,string name,key id,string str)
- {
- list l=llParseStringKeepNulls(str,[" "],[]);
- string cursore=llList2String(l,0);
- float valore=llList2Float(l,1);
- if(cursore=="angolo") ANGOLO=valore;
- if(cursore=="velocita") VELOCITA=valore;
- display();
- }
- touch_start(integer count)
- {
- vector vel=<VELOCITA,0,0>;
- rotation novanta=llEuler2Rot(DEG_TO_RAD*<0,90,0>);
- vel*=llGetRot()/novanta;
- llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT,0),llGetPos(),vel,llGetRot(),(integer)MASSA);
- }
- object_rez(key id)
- {
- llSay(100,"SIZE "+(string)MASSA);
- }
- }
- //////////////////////////////
- state lancia {
- state_entry()
- {
- vector vel=<VELOCITA,0,0>;
- rotation novanta=llEuler2Rot(DEG_TO_RAD*<0,90,0>);
- vel*=llGetRot()/novanta;
- llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT,0),llGetPos(),vel,llGetRot(),(integer)MASSA);
- }
- object_rez(key id)
- {
- llSay(100,"SIZE "+(string)MASSA);
- llResetScript();
- }
- touch_start(integer count)
- {
- llResetScript();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement