show altitude
on Thursday, May 12th, 2005 at 7:02 ammy altimeter… a wip.
vector FloorVector (vector pVector)
{
pVector.z= llFloor(pVector.z);
return pVector;
}
//
string PrintVector (vector pVector, integer pFlag)
{
string lStringRet;
lStringRet = (string)((integer)pVector.z);
return lStringRet;
}
default
{
state_entry()
{
state zon;
}
}
state zon
{
state_entry()
{
llWhisper(0, "z on");
llSetTimerEvent(1.0);
llListen(23,"",llGetOwner(),"");
}
timer()
{
vector lVec;
lVec = FloorVector (llGetPos());
string gForce = (string)llGetForce();
llSetText("z " +
PrintVector(lVec,0) +
" \n \n \n",
<1,1,1>, 1.0);
}
listen(integer channel, string name, key id, string message)
{
if (message=="z")
{
state off;
}
}
}
state off
{
state_entry()
{
llSetText("",<0,0,0>, 1.0);
llListen(23,"",llGetOwner(),"");
}
listen(integer channel, string name, key id, string message)
{
if (message=="z")
{
state zon;
}
}
}
my del.icio.us