Difference between revisions of "Virtual Tracking Guide"
From CRIPTWiki
Line 3: | Line 3: | ||
Hence, we will be able to use exist LSL command embedding in python to run the command. | Hence, we will be able to use exist LSL command embedding in python to run the command. | ||
− | The key | + | The key script that is used: |
− | + | To do a few things: | |
− | + | *IF (people within range) then | |
− | + | **SHOUT to the person about being tracked for the FIRST time | |
+ | **Ask for permission to track user. | ||
+ | **IF (POS/ROT not BOTH EQUAL ZERO) THEN | ||
+ | ***Get Time Stamp | ||
+ | ***Get Position Information | ||
+ | ***Get Rotation Information | ||
+ | ***Output into FILES? | ||
+ | } | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | integer perm = llGetPermissions(); | ||
+ | vector CamVec; | ||
+ | rotation CamRot; | ||
+ | integer loopTime; //how frequently the loop is run | ||
+ | |||
+ | |||
+ | if (perm & PERMISSION_TRACK_CAMERA) // using & is important! perm is a bitmask! | ||
{ | { | ||
//Get Camera Position 3D Coordinate | //Get Camera Position 3D Coordinate | ||
//Returns a VECTOR | //Returns a VECTOR | ||
− | llGetCameraPos(); | + | CamVec = llGetCameraPos(); |
//Get Camera Rotation | //Get Camera Rotation | ||
//Returns a ROTATION | //Returns a ROTATION | ||
− | llGetCameraRot(); | + | CamRot = llGetCameraRot(); |
+ | |||
+ | //Get User Name | ||
+ | llRequestAgentData(llDetectedKey(0), DATA_BORN); | ||
+ | //Request creation date | ||
+ | } | ||
+ | dataserver(key queryid, string data) | ||
+ | { | ||
+ | llSay(0, "You were born on: " + data); | ||
+ | } | ||
+ | } | ||
} | } | ||
Source: http://lslwiki.net/lslwiki/wakka.php?wakka=ScriptPermissions | Source: http://lslwiki.net/lslwiki/wakka.php?wakka=ScriptPermissions |
Revision as of 03:49, 7 June 2009
realXtend can run LSL scrpit no problem.
Hence, we will be able to use exist LSL command embedding in python to run the command.
The key script that is used:
To do a few things:
- IF (people within range) then
- SHOUT to the person about being tracked for the FIRST time
- Ask for permission to track user.
- IF (POS/ROT not BOTH EQUAL ZERO) THEN
- Get Time Stamp
- Get Position Information
- Get Rotation Information
- Output into FILES?
}
integer perm = llGetPermissions();
vector CamVec;
rotation CamRot;
integer loopTime; //how frequently the loop is run
if (perm & PERMISSION_TRACK_CAMERA) // using & is important! perm is a bitmask!
{ //Get Camera Position 3D Coordinate //Returns a VECTOR CamVec = llGetCameraPos();
//Get Camera Rotation //Returns a ROTATION CamRot = llGetCameraRot(); //Get User Name llRequestAgentData(llDetectedKey(0), DATA_BORN);
//Request creation date } dataserver(key queryid, string data) { llSay(0, "You were born on: " + data); }
}
}
Source: http://lslwiki.net/lslwiki/wakka.php?wakka=ScriptPermissions