Difference between revisions of "Talk:Chatbot"
(add wish for more idiomatic string parms/ results, add wish for list parms/ results) |
m (close out the wishes now answered in Chatbot (i.e., llSetLocalRot llApplyImpulse llApplyRotationalImpulse)) |
||
Line 1: | Line 1: | ||
== Examples That We Could/ Should Soon Add == | == Examples That We Could/ Should Soon Add == | ||
We could/ should soon add such | We could/ should soon add yet a few more concise demoes, such as: | ||
<pre> | <pre> | ||
/7 llSetPos("+"(llGetPos(), <0, 0, 2>)); | |||
/7 "*"(ZERO_ROTATION, ZERO_ROTATION) | |||
step toward owner | |||
face the sun | |||
/7 | |||
/7 | |||
face the sun | |||
name the sitting avatar | name the sitting avatar | ||
</pre> | </pre> | ||
== Bugs/ Wishes == | == Bugs/ Wishes == | ||
* parms and results of type list | * parms and results of type list | ||
LSL doesn't do lists of lists, so as yet parameters of type list don't work (e.g., llSetPrimitiveParams is hard to call) and results of type list don't work yet (e.g., llParseString2List is hard to call). | |||
We could/ should tweak the code to fix this. We could index each list found and then pass and return that index in place of the list. | |||
== Chatbot vs. the SL GUI == | == Chatbot vs. the SL GUI == | ||
I do think the SL GUI should let me toggle a switch to | I do think the SL GUI should let me toggle a switch to make my prim chattable, 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 [[Help:Getting_started_with_LSL|Getting Started with LSL]] tutorial, which only taught me to call [[llSetColor]] and [[llSetText]]. | ||
How I use the Chatbot is that I paste in commands from a menu I build elsewhere in a text editor. We could/ should demo how short a similar edit-compile-test can be, despite the SL GUI, if we write a script to execute one statement and print its parameters and result. For example, we could keep a script window open to llSetText to the last string saved there. | How I use the Chatbot is that I paste in commands from a menu I build elsewhere in a text editor. We could/ should demo how short a similar edit-compile-test can be, despite the SL GUI, if we write a script to execute one statement and print its parameters and result. For example, we could keep a script window open to llSetText to the last string saved there. | ||
<pre> | |||
default | |||
{ | |||
state_entry() | |||
{ | |||
llSetText("look at me blue", <0.0, 0.0, 1.0>, 1.0); | |||
} | |||
} | |||
</pre> |
Revision as of 21:14, 5 September 2007
Examples That We Could/ Should Soon Add
We could/ should soon add yet a few more concise demoes, such as:
/7 llSetPos("+"(llGetPos(), <0, 0, 2>)); /7 "*"(ZERO_ROTATION, ZERO_ROTATION) step toward owner face the sun name the sitting avatar
Bugs/ Wishes
- parms and results of type list
LSL doesn't do lists of lists, so as yet parameters of type list don't work (e.g., llSetPrimitiveParams is hard to call) and results of type list don't work yet (e.g., llParseString2List is hard to call). We could/ should tweak the code to fix this. We could index each list found and then pass and return that index in place of the list.
Chatbot vs. the SL GUI
I do think the SL GUI should let me toggle a switch to make my prim chattable, 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.
How I use the Chatbot is that I paste in commands from a menu I build elsewhere in a text editor. We could/ should demo how short a similar edit-compile-test can be, despite the SL GUI, if we write a script to execute one statement and print its parameters and result. For example, we could keep a script window open to llSetText to the last string saved there.
default { state_entry() { llSetText("look at me blue", <0.0, 0.0, 1.0>, 1.0); } }