- 0
Add automatic door close to script
You are about to reply to a thread that has been inactive for 1436 days.
Please take a moment to consider if this thread is worth bumping.
Please take a moment to consider if this thread is worth bumping.
Question
alaska87
Is it possible to add a part in the script that makes the door close automatically?
/*//( v7-D Feebie Type 1 Hinge Script )--//*/
/*//-- Works At ANY Angle --//*/
/*//-- NOTES:
works in ANY single prim door, linked or un-linked
works in muti prim doors NOT linked to a larger structure
//*/
/*//-- REQUIREMENTS:
a cut root prim, suggest cube, pathcut start=.125, end=.625
//*/
/*//-- CAVEAT:
single prim doors are limited to 5m width
//*/
/*//-- USERS MODIFY HERE v --//*/
integer gIntSwing = -105;
/*//-- use -# to reverse the direction of swing, eg. -90; --//*/
rotation gRotSwing;
default{
state_entry(){
gRotSwing = llEuler2Rot( < 0.0, (float)gIntSwing * DEG_TO_RAD, 0.0> );
}
touch_start( integer vInt ){
llSetLocalRot( (gRotSwing = (ZERO_ROTATION / gRotSwing)) * llGetLocalRot() );
}
}
/*//-- IF Redistributing as-is:
Please leave script full permissions & include all comments
//*/
Link to comment
Share on other sites
9 answers to this question
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now