Rockslide

Caete

Scientist Lady of Science
Joined
Sep 20, 2018
Messages
1,559
Location
20 Minutes into the future
SL Rez
2006
Ok, no surprise that while I can troubleshoot most script issues, I am fairly crap at creating a script from scratch.

So as I am revamping my haunted hous, I want to put a rockslide in it. I want to use a prim to trigger it when it is walked on. I know I'll have to play with the xyz rez spot for the rocks but that's no problem, just trial and error. My issue is the script I have triggers way more than once. So I need it to trigger just once and then a delay before it resets. I have the rocks already set to temp so th delay should be maybe 3-5 minutes. Too late at night for my brain to work so here's what I have started with:

// This script is essentially the example pn the wiki page for llRezObject
// http://wiki.secondlife.com/wiki/LlRezObject
// where some scammer got it from, and is charging 49L for it
// Give away freely!

string object = "Object"; // Name of object in inventory
vector relativePosOffset = <2.0, 0.0, 1.0>; // "Forward" and a little "above" this prim
vector relativeVel = <1.0, 0.0, 0.0>; // Traveling in this prim's "forward" direction at 1m/s
rotation relativeRot = <0.707107, 0.0, 0.0, 0.707107>; // Rotated 90 degrees on the x-axis compared to this prim
integer startParam = 10;

default
{
collision(integer num_detected)
{
vector myPos = llGetPos();
rotation myRot = llGetRot();
vector rezPos = myPos+relativePosOffset*myRot;
vector rezVel = relativeVel*myRot;
rotation rezRot = relativeRot*myRot;
llRezObject(object, rezPos, rezVel, rezRot, startParam);
}
}