removed useless _ folders
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
<Project name="Car_Script_Front_Wheel" guid="D6F47753-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D6F4782C-6C00-1014-B904-200204C60A89">
|
||||
<Script name="Car_Script_Front_Wheel_1.lsl" guid="D6F49460-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
@@ -0,0 +1,97 @@
|
||||
// :CATEGORY:Vehicles
|
||||
// :NAME:Car_Script_Front_Wheel
|
||||
// :AUTHOR:Anonymous
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:38:50
|
||||
// :ID:155
|
||||
// :NUM:223
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Car Script (Front Wheel).lsl
|
||||
// :CODE:
|
||||
|
||||
rotation Inverse(rotation r)
|
||||
{
|
||||
r.x = -r.x;
|
||||
r.y = -r.y;
|
||||
r.z = -r.z;
|
||||
return r;
|
||||
}
|
||||
rotation GetParentRot()
|
||||
{
|
||||
return Inverse(llGetLocalRot())*llGetRot();
|
||||
}
|
||||
SetLocalRot(rotation x)
|
||||
{
|
||||
llSetRot(x*Inverse(GetParentRot()));
|
||||
}
|
||||
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
}
|
||||
|
||||
link_message(integer sender_num, integer num, string str, key id)
|
||||
{
|
||||
if(str == "WHEEL_DRIVING")
|
||||
{
|
||||
state driving;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
state driving
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
SetLocalRot(llEuler2Rot(<-1 * PI_BY_TWO,0,0> ));
|
||||
llSetTimerEvent(0.5);
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
vector vel = llGetVel();
|
||||
float speed = llVecMag(vel);
|
||||
llSetTextureAnim(ANIM_ON|LOOP|SMOOTH|ROTATE,ALL_SIDES,0,0,0,0,speed);
|
||||
}
|
||||
|
||||
link_message(integer sender_num, integer num, string str, key id)
|
||||
{
|
||||
if(str == "WHEEL_DEFAULT")
|
||||
{
|
||||
state default;
|
||||
}
|
||||
|
||||
if(str == "WHEEL_FORWARD")
|
||||
{
|
||||
SetLocalRot(llEuler2Rot(<-1 * PI_BY_TWO,0,0> ));
|
||||
}
|
||||
|
||||
if(str == "WHEEL_REVERSE")
|
||||
{
|
||||
SetLocalRot(llEuler2Rot(<-1 * PI_BY_TWO,0,0> ));
|
||||
}
|
||||
|
||||
if(str == "WHEEL_LEFT")
|
||||
{
|
||||
SetLocalRot(llEuler2Rot(<-1 * PI_BY_TWO, -1 * PI_BY_TWO / 2, 0> ));
|
||||
}
|
||||
|
||||
if(str == "WHEEL_RIGHT")
|
||||
{
|
||||
SetLocalRot(llEuler2Rot(<-1 * PI_BY_TWO, PI_BY_TWO / 2, 0> ));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
state_exit()
|
||||
{
|
||||
SetLocalRot(llEuler2Rot(<-1 * PI_BY_TWO,0,0> ));
|
||||
llSetTextureAnim(0,ALL_SIDES,0,0,0,0,0);
|
||||
}
|
||||
|
||||
}
|
||||
// END //
|
||||
Reference in New Issue
Block a user