Talk:Chatbot

From Second Life Wiki
Revision as of 07:32, 5 September 2007 by Ppaatt Lynagh (talk | contribs) (I do think the SL GUI should let me toggle a switch to do this)
Jump to navigation Jump to search

I do think the SL GUI should let me toggle a switch to do this, i.e., to teach any prim of mine to listen to my LSL chat, for the sake of script folk like me who think by chatting. Meanwhile, I write code like this to let me chat commands to my prims anyhow. I wrote this sample just after walking thru the delightfully concise Getting Started with LSL tutorial, which only taught me to call llSetColor and llSetText.

Concise example commands we could/ should soon add include:

llSetAlpha
zero rotation

push linear
push rotational
/7 llApplyRotationalImpulse(<3.0, 0.0, 0.0>, TRUE); // roll about the X axis
/7 llApplyRotationalImpulse(<0.0, 3.0, 0.0>, TRUE); // pitch about the Y axis
/7 llApplyRotationalImpulse(<0.0, 0.0, 3.0>, TRUE); // yaw about the Z axis
/7 llSetStatus(STATUS_PHYSICS, FALSE); llSetStatus(STATUS_PHYSICS, TRUE); // zero inertia

move away from owner, move toward owner
face the sun, turn away

name the sitting avatar

Vector/ rotation arithmetic in prefix syntax (e.g., syntax a la overloaded operators in C++) we could/ should soon add, e.g.

"*"(ZERO_ROTATION, ZERO_ROTATION)