Possibly the wrong direction but.....
I am trying to rez an object, and have it rez flat on a rock, that can be taken by an AV. Rez the same object on a timer, one hour or so, which stays until taken. And so on...
This is what I have;
vector velocity;
integer shot = FALSE;
integer fade = FALSE;
float alpha = 1.0;
default
{
state_entry()
{
llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
}
on_rez(integer start_param)
{
llSetStatus(STATUS_DIE_AT_EDGE, TRUE);
llSetBuoyancy(1.0);
velocity = llGetVel();
float vmag;
vmag = llVecMag(velocity);
if (vmag > 0.1) shot = TRUE;
llSetTimerEvent(0.0); (((I thought this is where the rez time was set?)))
}
touch_start(integer num)
{
if (llDetectedType(0) & AGENT)
{
integer i;
for ( i=0; i<num; i++ ) {
llRezObject( "My Object", llGetPos()+<0,0,0.5>, <0,0,0>, <0,0,0,1>, i );
integer i;
}}
}
}
timer()
{
if (!fade)
{
if (shot)
{
llDie();
}
}
else
{
llSetAlpha(alpha, -1);
alpha = alpha * 0.95;
if (alpha < 0.1)
{
llDie();
}
}
}
}
Sort of works, on touch, but I cannot work out the timer and the object is vertical.
Hmmm, OK I'm new. Any help apreciated.