From Tony SkyBlinder Hirons:
Hello,
This script is for break one door, or can be used for other prims.
You can change the timer for reload the HP.
Can be one good tool for doing rp too.
If you have any questions let me know, ty.
//This script is distributed for free and must stay that way. integer counter = 500; float TIMER = 180.0; conteur (){ counter -= 10; llSetText((string)counter +"/500 HP", <1.0, 1.0, 1.0>, 1.0); if (counter < 500) { TIMER = 180.0;//here we can change the timer llSetTimerEvent(TIMER); llSetColor(<0.20000, 0.90196, 0.80392>, ALL_SIDES ); } if (counter < 1) { llMessageLinked(LINK_SET, 0, "dk", NULL_KEY); llSetText("", <1.0, 0.0, 0.0>, 1.0); llSetAlpha(0.0,ALL_SIDES); llSetPrimitiveParams(); TIMER = 120.0;// here I change the timer llSetTimerEvent(TIMER); } } default { state_entry() { llMessageLinked(LINK_SET, 0, "dr", NULL_KEY); llSetText((string)counter +"/500 HP", <1.0, 0.0, 0.0>, 1.0); llSetColor(<0.20000, 0.90196, 0.80392>, ALL_SIDES ); } collision(integer num) { if (llDetectedType(0) & AGENT) { llCollisionFilter("none", NULL_KEY, TRUE); llSleep(0.1); llCollisionFilter("", NULL_KEY, TRUE); } else { conteur ();} } timer(){ llMessageLinked(LINK_SET, 0, "dr", NULL_KEY); counter =500; llSetAlpha(0.50,ALL_SIDES); //llSetColor(<0.0, 0.0, 1.0>, ALL_SIDES ); llSetPrimitiveParams(); llSetText((string)counter +"/500 HP", <1.0, 0.0, 0.0>, 1.0); llSetTimerEvent(0.0);} }