<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=Scripting_Tutorial_01</id>
	<title>Scripting Tutorial 01 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.osgrid.org/index.php?action=history&amp;feed=atom&amp;title=Scripting_Tutorial_01"/>
	<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=Scripting_Tutorial_01&amp;action=history"/>
	<updated>2026-10-25T11:49:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>http://wiki.osgrid.org/index.php?title=Scripting_Tutorial_01&amp;diff=28&amp;oldid=prev</id>
		<title>Osgridadmin: Created page with &quot;  [12:04]  Fu Barr: we&#039;ll give it a few more minutes and we&#039;ll start.   [12:04]  Fu Barr: we&#039;ll use text so people can coopy the log   [12:05]  Fu Barr: i&#039;ll try and keep the...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.osgrid.org/index.php?title=Scripting_Tutorial_01&amp;diff=28&amp;oldid=prev"/>
		<updated>2017-12-25T05:03:33Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;  [12:04]  Fu Barr: we&amp;#039;ll give it a few more minutes and we&amp;#039;ll start.   [12:04]  Fu Barr: we&amp;#039;ll use text so people can coopy the log   [12:05]  Fu Barr: i&amp;#039;ll try and keep the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;  [12:04]  Fu Barr: we&amp;#039;ll give it a few more minutes and we&amp;#039;ll start.&lt;br /&gt;
  [12:04]  Fu Barr: we&amp;#039;ll use text so people can coopy the log&lt;br /&gt;
  [12:05]  Fu Barr: i&amp;#039;ll try and keep the spelling issues to a minimum :)&lt;br /&gt;
  [12:05]  Fu Barr: feel free to rez a single chair, but a field of chairs created a &amp;#039;classroom&amp;#039; state that i dont really need.&lt;br /&gt;
  [12:06]  Fu Barr: also you&amp;#039;ll all need to rez a cube to work with and that&amp;#039;s hard to do from a few rows back in class :)&lt;br /&gt;
  [12:07]  Fu Barr: okay - lets get started other will just have to join in later&lt;br /&gt;
  [12:07]  Fu Barr: so first off, i&amp;#039;m going to do a series of chats.&lt;br /&gt;
  [12:07]  Fu Barr: this will be the first&lt;br /&gt;
  [12:08]  Fu Barr: we&amp;#039;re going to start at the very berginnink. for two reasons&lt;br /&gt;
  [12:08]  Fu Barr: yes, many of you may have mucked around with some code and I know that at least one of you is a master&lt;br /&gt;
  [12:08]  Fu Barr winks at total&lt;br /&gt;
  [12:09]  Fu Barr: but, in order to make sure I know what you all _should_ know because I told you The One True Way&lt;br /&gt;
  [12:09]  Fu Barr: i&amp;#039;m starting at the beginning for my own sanity.&lt;br /&gt;
  [12:10]  Fu Barr: and 2. some people might need to start at the beginning coz they not masters, yet.&lt;br /&gt;
  [12:10]  Fu Barr: so that&amp;#039;s my first housekeeeping announcement&lt;br /&gt;
  [12:10]  Fu Barr: the second is:&lt;br /&gt;
  [12:10]  Fu Barr: we&amp;#039;re going to try and teach 3 different things.&lt;br /&gt;
  [12:11]  Fu Barr: 1. basic programming stuff that&amp;#039;s valid for many different languages.&lt;br /&gt;
  [12:11]  Fu Barr: 2. programming stuff that is specific to SL/OpenSim&lt;br /&gt;
  [12:11]  Fu Barr: 3. some programming best practices&lt;br /&gt;
  [12:12]  Fu Barr: and example of thing 1. is &amp;#039;how do i add two numbers together&amp;#039;&lt;br /&gt;
  [12:12]  Fu Barr: an example of 2. would be &amp;#039;how do i react to a click on a cube in opensim&amp;#039;&lt;br /&gt;
  [12:13]  Fu Barr: an example of 3. might be &amp;#039;try and give sensible names to your variables, that way you&amp;#039;ll need less comments&amp;#039;&lt;br /&gt;
  [12:13]  Fu Barr: so there you have it.&lt;br /&gt;
  [12:13]  Fu Barr: we&amp;#039;re starting from the beginning to keep me sane. we&amp;#039;re going to do basic programming, basic opensim related stuff and hopefully pick up some good habits.&lt;br /&gt;
  [12:14]  Fu Barr: anyh questions so far?&lt;br /&gt;
  [12:15]  Fu Barr: please do intertupt me with &amp;#039;stupid questions&amp;#039; - if they are really stupid i&amp;#039;ll make fun of you in front of everybody, if they are relevant I&amp;#039;ll answer to the best of my ability. sont be shy :)&lt;br /&gt;
 [12:15]  Fu Barr: *dont&lt;br /&gt;
 [12:15]  Snakedance Moonwing: im full of stupid questions :D&lt;br /&gt;
 [12:15]  Snakedance Moonwing: no worries&lt;br /&gt;
 [12:15]  Fu Barr: okay so let&amp;#039;s get going&lt;br /&gt;
 [12:15]  Fu Barr: if you havent done so please rez a cube&lt;br /&gt;
 [12:16]  Fu Barr: so i&amp;#039;ve coloured mine garish pink - so everybody can see it&amp;#039;s mine etc.&lt;br /&gt;
 [12:16]  Fu Barr: now, the first thing to understand about scripting in opensim is the answer to &amp;#039;where does my code live&amp;#039;&lt;br /&gt;
 [12:17]  Nick.Envoy @grid.starlight-world.eu:8002 is Online&lt;br /&gt;
 [12:17]  Foxx Prim: Script running&lt;br /&gt;
 [12:17]  Fu Barr: so i&amp;#039;m assuming that most of us have added a script of some sort to a prim.... and that would be in the prims &amp;#039;content&amp;#039; tab.&lt;br /&gt;
 [12:17]  Ni Lemon: yay!&lt;br /&gt;
 [12:17]  KU - cube: Script running&lt;br /&gt;
 [12:17]  Fu Barr: if you havent done so before, please switch to your prims &amp;#039;content&amp;#039; tab and use the &amp;#039;new script&amp;#039; button to add a script&lt;br /&gt;
 [12:17]  Object: Script running&lt;br /&gt;
 [12:18]  Romulun Rockett: yes :)&lt;br /&gt;
 [12:18]  Object: Script running&lt;br /&gt;
 [12:18]  Object: Script running&lt;br /&gt;
 [12:18]  Foxx Prim: Script running&lt;br /&gt;
 [12:18]  Foxx Prim: Edited by Foxx&lt;br /&gt;
 [12:18]  Object: Script running&lt;br /&gt;
 [12:18]  Hans: Script running&lt;br /&gt;
 [12:18]  Fu Barr: you&amp;#039;ll see the prim add a script and &amp;#039;tell us all that it&amp;#039;s running&lt;br /&gt;
 [12:18]  Object: Script running&lt;br /&gt;
 [12:18]  Fu Barr: so far so good?&lt;br /&gt;
 [12:18]  Object: Script running&lt;br /&gt;
 [12:18]  Fu Barr: if you&amp;#039;ve given your prim a name.. it&amp;#039;ll echo on the chat&lt;br /&gt;
 [12:18]  KU - cube: Script running&lt;br /&gt;
 [12:19]  Mirror Amorasi is Offline&lt;br /&gt;
 [12:19]  Object: Script running&lt;br /&gt;
 [12:19]  Ni&amp;#039;s prim: Script running&lt;br /&gt;
 [12:19]  Object: Script running&lt;br /&gt;
 [12:19]  Boogie Box: Script running&lt;br /&gt;
 [12:19]  Object: Script running&lt;br /&gt;
 [12:19]  Fu Barr: now, before we move on... we need to maybe note that the script isn;t running in the prim&lt;br /&gt;
 [12:19]  Object: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:19]  Fu Barr: yes it sort of &amp;#039;lives&amp;#039; in the prim&lt;br /&gt;
 [12:19]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:19]  Fu Barr: but it&amp;#039;s running on the opensim server&lt;br /&gt;
 [12:19]  i  Like Hans: Script running&lt;br /&gt;
 [12:19]  i  Like Hans: Script running&lt;br /&gt;
 [12:19]  Sausage: functional&lt;br /&gt;
 [12:19]  Script Class: Script running&lt;br /&gt;
 [12:19]  Fu Barr: there&amp;#039;s a subtle difference.&lt;br /&gt;
 [12:20]  Fu Barr: anybody want to try and tell us what that might be?&lt;br /&gt;
 [12:20]  Fu Barr: script running in prim vs script running on server&lt;br /&gt;
 [12:20]  Fu Barr: anybody?&lt;br /&gt;
 [12:20]  Romulun Rockett: when you say the open sim server, do you meen the server for the sim were in or the main OSG server that all the sims link to????&lt;br /&gt;
 [12:21]  Fu Barr: server for the local region, the romete ones are asset servers...&lt;br /&gt;
 [12:21]  Fu Barr: *remote&lt;br /&gt;
 [12:21]  Ni Lemon: both servers I think&lt;br /&gt;
 [12:21]  Ni Lemon: our own and osg one&lt;br /&gt;
 [12:21]  Fu Barr: though there&amp;#039;s the local assets too&lt;br /&gt;
 [12:21]  Fu Barr: the running script is in the LOCAL server&lt;br /&gt;
 [12:21]  Romulun Rockett: ok thanks :)&lt;br /&gt;
 [12:21]  Jeff Hall: i thought it was loca server only&lt;br /&gt;
 [12:21]  Jeff Hall: yay i got it&lt;br /&gt;
 [12:21]  Fu Barr: the script might be stored on the asset server&lt;br /&gt;
 [12:22]  Fu Barr: anyhow the idea i want to convey - even though it&amp;#039;s v premature is that scripts compete for local server CPU and RAM&lt;br /&gt;
 [12:22]  Fu Barr: they dont run in your viewer&lt;br /&gt;
 [12:22]  Fu Barr: except certain functions.... but more about that later&lt;br /&gt;
 [12:22]  Kelso.Uxlay @hg.creanovale.ca:8052: the server allocates resources and time slices&lt;br /&gt;
 [12:23]  Fu Barr: so when you script you have to keep in mind that your script might work well on your own region where there&amp;#039;s nothing going on but lag like   hell someplace fine&lt;br /&gt;
 [12:23]  Fu Barr: *else&lt;br /&gt;
 [12:23]  Fu Barr: so - our small scripts wont be affected but bigger complex ones will be.&lt;br /&gt;
 [12:24]  Fu Barr: ayhow - just wante to mention it before we got started.&lt;br /&gt;
 [12:24]  Fu Barr: now.&lt;br /&gt;
 [12:24]  Romulun Rockett: ok :)&lt;br /&gt;
 [12:24]  Kelso.Uxlay @hg.creanovale.ca:8052: noted&lt;br /&gt;
 [12:24]  Fu Barr: first thing we&amp;#039;re going to learn is how to be nice.&lt;br /&gt;
 [12:24]  Ni Lemon: question&lt;br /&gt;
 [12:24]  Fu Barr: polite even&lt;br /&gt;
 [12:24]  Fu Barr: our scripts are chatting inpublic&lt;br /&gt;
 [12:24]  Fu Barr: loudly&lt;br /&gt;
 [12:25]  Repudiator quann is Online&lt;br /&gt;
 [12:25]  Fu Barr: we&amp;#039;re going to open the scripts we added and change one &amp;#039;function&amp;#039; so the prim only talks to its owner&lt;br /&gt;
 [12:25]  Fu Barr: open the script&lt;br /&gt;
 [12:25]  Fu Barr: in the contents tab&lt;br /&gt;
 [12:26]  Fu Barr: and change the llSay() function to llOwnerSay()&lt;br /&gt;
 [12:26]  Fu Barr: just add the word &amp;#039;Owner&amp;#039; to the existing llSay&lt;br /&gt;
 [12:26]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:26]  Fu Barr: save your script - and you&amp;#039;ll see the prim respond - but everybody else wont&lt;br /&gt;
 [12:27]  Foxx Prim: Edited by Foxx&lt;br /&gt;
 [12:27]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:27]  Fu Barr: lol - well, if you added the Owner in the right place it will :)&lt;br /&gt;
 [12:27]  Total Sorbet: you will need to delete the 0,&lt;br /&gt;
 [12:27]  Fu Barr: so llSay, becomes llOwnerSay&lt;br /&gt;
 [12:27]  George Equus: Mine say ERROR&lt;br /&gt;
 [12:27]  Fu Barr: i know&lt;br /&gt;
 [12:27]  Jeff Hall: yes have to remove the 0&lt;br /&gt;
 [12:27]  Fu Barr: i want there to be an error&lt;br /&gt;
 [12:27]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:27]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:27]  Fu Barr: that way i can teach you the next thing :)&lt;br /&gt;
 [12:28]  George Equus: Ahh&lt;br /&gt;
 [12:28]  Fu Barr: there&amp;#039;s an error&lt;br /&gt;
 [12:28]  Fu Barr: it&amp;#039;s broken&lt;br /&gt;
 [12:28]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [12:28]  Fu Barr: the world will end.&lt;br /&gt;
 [12:28]  Fu Barr: soon.&lt;br /&gt;
 [12:28]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 12:28]  ripper Portal is Offline&lt;br /&gt;
 [12:28]  Fu Barr: the wuestion is why and what is breaking?&lt;br /&gt;
 [12:28]  Hans Nerido: delete the 0, all is fine&lt;br /&gt;
 [12:28]  Ken Savage is Online&lt;br /&gt;
 [12:28]  Fu Barr: why and what of breaking is 80% of writing code.&lt;br /&gt;
 [12:28]  Jeff Hall: no channel for talking to owner only&lt;br /&gt;
 [12:28]  Romulun Rockett: Hello :)&lt;br /&gt;
 [12:29]  Fu Barr: yes, you&amp;#039;re all giving the correct solution&lt;br /&gt;
 [12:29]  Fu Barr: but the solution isn;t that interesting for the moment.&lt;br /&gt;
 [12:29]  Ken Savage is Offline&lt;br /&gt;
 [12:29]  Fu Barr: what we want to understand is something called &amp;#039;function signatures&amp;#039;&lt;br /&gt;
 [12:29]  Fu Barr: it stands to reason that llSay() will say something&lt;br /&gt;
 [12:29]  ripper Portal is Online&lt;br /&gt;
 [12:30]  Fu Barr: it also stands to reason that llOwnerSay() will only say stuff to the owner&lt;br /&gt;
 [12:30]  ScriptClassCube: Script running&lt;br /&gt;
 [12:30]  Fu Barr: but both functions need extra informatino to work properly.&lt;br /&gt;
 [12:30]  Avia Bonne is Offline&lt;br /&gt;
 [12:30]  Fu Barr: if you use llSay() you need to tell the function what to say, and into which CHALLEN&lt;br /&gt;
 [12:30]  Fu Barr: *CHANNEL&lt;br /&gt;
 [12:31]  Fu Barr: so here we need to know something about how opensim works&lt;br /&gt;
 [12:31]  Fu Barr: opensim has many chat channels&lt;br /&gt;
 [ 12:31]  Fu Barr: but only channel 0 is &amp;#039;public&amp;#039;&lt;br /&gt;
 [12:31]  Fu Barr: channel 0 is what we use for our chat now. the one we can hear&lt;br /&gt;
 [12:31]  Avia Bonne is Online&lt;br /&gt;
 [12:32]  Fu Barr: if i write the follwing code: llSay(789, &amp;quot;cant hear this&amp;quot;);&lt;br /&gt;
 [12:32]  Fu Barr: the code is correct. but you wont see it.&lt;br /&gt;
 [12:32]  Fu Barr: but couse the viewer isn;t showing you what gets said in channel 789&lt;br /&gt;
 [12:32]  Fu Barr: so here&amp;#039;s a lot to learn&lt;br /&gt;
 [12:32]  Fu Barr: 1. it doesn;t do what i want it to do&lt;br /&gt;
 [12:33]  Fu Barr: this doesnt automatically meanyour code is WRONG&lt;br /&gt;
 [12:33]  Fu Barr: it might just be that your code if correct, but it&amp;#039;s just not the RIGHT code&lt;br /&gt;
 [12:33]  Fu Barr: to get done what you need to do&lt;br /&gt;
 [12:33]  ScriptClassCube: George&amp;#039;s Script running&lt;br /&gt;
 [12:33]  Jeff Hall: u need to read and understant the object model for function u use&lt;br /&gt;
 [12:33]  Fu Barr: now, if i was listening to channel 789&lt;br /&gt;
 [12:34]  Fu Barr: i would hear the message just fine&lt;br /&gt;
 [12:34]  Nick.Envoy @grid.starlight-world.eu:8002 is Offline&lt;br /&gt;
 [12:34]  Fu Barr: unfortunately - in normal situations as an avatar you can really hear or listen to these other channels&lt;br /&gt;
 [12:35]  Fu Barr: which is why the millions of channels other than 0 are used to make prims and others objects in opensim talk to each other&lt;br /&gt;
 [12:35]  Nick.Envoy @grid.starlight-world.eu:8002 is Online&lt;br /&gt;
 [12:35]  Fu Barr: if you want 2 prims to communicate, then you pick a channel - any channel 283294586245 for example&lt;br /&gt;
 [12:35]  Fu Barr: and make sure the prims know which channel touse and hey presto your prims can communicate without any avatar hearing tham&lt;br /&gt;
 [12:35]  Areys Damar: wow&lt;br /&gt;
 [12:36]  Fu Barr: which is great and we&amp;#039;ll see how this helps us do all sorts of stuff&lt;br /&gt;
 [12:36]  Fu Barr: so, a recap.&lt;br /&gt;
 [12:36]  Romulun Rockett: &amp;quot;two prims communicate&amp;quot; when would prims communicate with each other, if they were linked???&lt;br /&gt;
 [12:36]  Fu Barr: 1. opensim has channels&lt;br /&gt;
 [12:36]  Fu Barr: we&amp;#039;ll see how two can communicate after my recap :)&lt;br /&gt;
 [12:36]  Fu Barr: so recap:&lt;br /&gt;
 [12:37]  Fu Barr: 1. opensim has channels&lt;br /&gt;
 [12:37]  Fu Barr: 2. the default &amp;#039;public chat&amp;#039; channel is challe 0&lt;br /&gt;
 [12:37]  Fu Barr: *channel&lt;br /&gt;
 [12:37]  Fu Barr: 3. spamming channel 0 with text frmo your prims and linksets is very bad manners&lt;br /&gt;
 [12:37]  Fu Barr: 4. you need to make the be quieter.&lt;br /&gt;
 [12:37]  Snakedance Moonwing plays with her massive floats!&lt;br /&gt;
 [12:38]  Fu Barr: 5. you do this by replacing llSay() with llOwnerSay()&lt;br /&gt;
 [12:38]  Jeff Hall: mmm but Fu...sometimes u need to talk to user, not owner only&lt;br /&gt;
 [12:38]  Fu Barr: 6. but then we get erros - because we know know that different functions need differnet informatino to work correctly.&lt;br /&gt;
 [12:38]  Fu Barr: hang on - getting there&lt;br /&gt;
 [12:38]  ScriptClassCube: George&amp;#039;s Script running, strangely enough&lt;br /&gt;
 [12:39]  Fu Barr: 7. the info llSay needs is the channel and the message&lt;br /&gt;
 [12:39]  Fu Barr: but llOwnerSay - it doesn;t need the channel - because it just talks straight to the user!&lt;br /&gt;
 [12:39]  Fu Barr: or to the owner rather&lt;br /&gt;
 [12:39]  Fu Barr: so like some said before&lt;br /&gt;
 [12:40]  Fu Barr: in order for llOwnerSay to work properly, you drop the 0 from the function signature and voile.&lt;br /&gt;
 [12:40]  Fu Barr: *voila&lt;br /&gt;
 [12:40]  Fu Barr: so who&amp;#039;s going to ask the obvious questino?&lt;br /&gt;
 [12:40]  Ni Lemon: we all see the messages without 0&lt;br /&gt;
 [12:40]  Fu Barr: the one abbout function signatures&lt;br /&gt;
 [12:40]  dan banner: drop the , too&lt;br /&gt;
 [12:41]  Fu Barr: oh yes, function signature informatin is sperated with a comma&lt;br /&gt;
 [12:41]  Fu Barr: good point&lt;br /&gt;
 [12:41]  Fu Barr: the questino has to be - bugger, where to i find out about all the various functions and their signatures?&lt;br /&gt;
 [12:41]  Fu Barr: *do&lt;br /&gt;
 [12:41]  dan banner: google is helpul&lt;br /&gt;
 [12:42]  Jeff Hall: wiki&lt;br /&gt;
 [12:42]  Fu Barr: well, the best place to learn and look up is the SecondLife wiki&lt;br /&gt;
 [12:42]  Fu Barr: we&amp;#039;ll see how that all works as we get further into the classes&lt;br /&gt;
 [12:43]  Fu Barr: but the secondlife LSL wiki is an essential resource&lt;br /&gt;
 [12:43]  Fu Barr: good. now let&amp;#039;s wrap up this class with two cubes talking to eachother&lt;br /&gt;
 [12:43]  Fu Barr: along the way we&amp;#039;ll learn another very important thing about how opensim works&lt;br /&gt;
 [12:43]  Romulun Rockett: so is the scripting languege in here, all the same as SL??? hasn&amp;#039;t it changed atall???&lt;br /&gt;
 [12:44]  Fu Barr: nope&lt;br /&gt;
 [12:44]  Romulun Rockett: :) :)&lt;br /&gt;
 [12:44]  Fu Barr: opensim has 99% of the SL LSL&lt;br /&gt;
 [12:44]  Fu Barr: but it also has it&amp;#039;s own fuctions&lt;br /&gt;
 [12:44]  Fu Barr: OSSL&lt;br /&gt;
 [12:44]  Fu Barr: they are fabulous&lt;br /&gt;
 [12:44]  Romulun Rockett: ok:)&lt;br /&gt;
 [12:45]  Fu Barr: the data for those is on the opensim wiki&lt;br /&gt;
 [12:45]  Fu Barr: but there are complications and issues etc. so we&amp;#039;re going to deal for the most part with the regular LSL functions - pleanty to learn there :)&lt;br /&gt;
 [12:45]  Fu Barr: so if we all have a second prim rezzed...&lt;br /&gt;
 [12:46]  Fu Barr: let&amp;#039;s try and understand how we&amp;#039;re going to try and get these two prims to talk to each other&lt;br /&gt;
 [12:46]  Fu Barr: then we&amp;#039;ll write the code for it&lt;br /&gt;
 [12:46]  Fu Barr: so it&amp;#039;s clear we&amp;#039;ll need to decide on a channel number to use for our chatty prims.&lt;br /&gt;
 [12:47]  Arielle.Delamerlibre @phaandoria.de:8002 is Offline&lt;br /&gt;
 [12:47]  Fu Barr: if the prims dont have a common channel.... it&amp;#039;s not going to work&lt;br /&gt;
 [12:47]  Fu Barr: so for my example i;m picking channel -1234&lt;br /&gt;
 [12:47]  Arielle.Delamerlibre @phaandoria.de:8002 is Online&lt;br /&gt;
 [12:47]  Fu Barr: that&amp;#039;s minus 1234&lt;br /&gt;
 [12:47]  Fu Barr: -1243&lt;br /&gt;
 [12:47]  Fu Barr: oops&lt;br /&gt;
 [12:47]  Fu Barr: -1234&lt;br /&gt;
 [12:47]  George Equus: :)&lt;br /&gt;
 [12:47]  Fu Barr: you guys will have to pick some other number or we&amp;#039;ll be having cross chat&lt;br /&gt;
 [12:47]  Fu Barr: that should be clear i hope :)&lt;br /&gt;
 [12:48]  Fu Barr: then we need to have on prim llSay() to the channel&lt;br /&gt;
 [12:48]  Fu Barr: *one&lt;br /&gt;
 [12:48]  Fu Barr: and the otehr prim has to LISTEN to the talking prim&lt;br /&gt;
 [12:48]  Fu Barr: one SPEAKS, the other one LISTENS&lt;br /&gt;
 [12:49]  Fu Barr: so, here we come to a new idea&lt;br /&gt;
 [12:49]  Fu Barr: the notion of &amp;#039;listening&amp;#039; is evident to us humans etc.&lt;br /&gt;
 [12:49]  Fu Barr: even a rabbit or a dawg might listen&lt;br /&gt;
 [12:49]  Fu Barr: but prims don&amp;#039;t listen &amp;#039;of themselves&amp;#039;&lt;br /&gt;
 [12:49]  Fu Barr: we have to tell a prim to start listening&lt;br /&gt;
 [12:50]  Fu Barr: otherwise it just sits about. literally without &amp;#039;ears&amp;#039;&lt;br /&gt;
 [12:50]  Object: Script running&lt;br /&gt;
 [12:50]  Fu Barr: the function we canuse to give a prim &amp;#039;ears&amp;#039; is llListen()&lt;br /&gt;
 [12:50]  Fu Barr: a bit abvious. i know.&lt;br /&gt;
 [12:50]  Fu Barr: *obvious&lt;br /&gt;
 [12:50]  ScriptClassCube: Script running&lt;br /&gt;
 [12:51]  Fu Barr: so anybody what to have a guess at what sort of informatino llListen might need to work properly?&lt;br /&gt;
 [12:51]  dan banner: channel&lt;br /&gt;
 [12:51]  Fu Barr: what might the function signature be for llListen?&lt;br /&gt;
 [12:51]  Fu Barr: correct channel is an obvious one&lt;br /&gt;
 [12:51]  Fu Barr: anything else?&lt;br /&gt;
 [12:51]  Jeff Hall: message&lt;br /&gt;
 [12:52]  Fu Barr: that&amp;#039;s true too is less obvious&lt;br /&gt;
 [12:52]  Kelso.Uxlay @hg.creanovale.ca:8052: llListen( integer channel, string name, key id, string msg );&lt;br /&gt;
 [12:52]  Fu Barr: *if&lt;br /&gt;
 [12:52]  Fu Barr: tere you go&lt;br /&gt;
 [12:52]  Romulun Rockett: might it be listening for a spesific text string??&lt;br /&gt;
 [12:52]  Fu Barr: i was waiting for the smart alec in the group :)&lt;br /&gt;
 [12:52]  Fu Barr: well done kelso :)&lt;br /&gt;
 [12:52]  Kelso.Uxlay @hg.creanovale.ca:8052: Sl wiki&lt;br /&gt;
 [12:53]  Fu Barr: excellent!&lt;br /&gt;
 [12:53]  Fu Barr: so the llListen function signature has 4 parameters&lt;br /&gt;
 [12:53]  Fu Barr: post the again kelso&lt;br /&gt;
 [12:53]  Fu Barr: *them&lt;br /&gt;
 [12:53]  Kelso.Uxlay @hg.creanovale.ca:8052: llListen( integer channel, string name, key id, string msg );&lt;br /&gt;
 [12:53]  Fu Barr: thanks&lt;br /&gt;
 [12:53]  Fu Barr: like dan said - first is channel&lt;br /&gt;
 [12:53]  Fu Barr: 2nd is the name of the talking prim&lt;br /&gt;
 [12:54]  Fu Barr: that&amp;#039;s the thing you called it on the general tab&lt;br /&gt;
 [12:54]  Fu Barr: something like fu&amp;#039;s magic talkingp rim&lt;br /&gt;
 [12:54]  Fu Barr: the 3rd parameter is the UUID of the talking prim&lt;br /&gt;
 [12:54]  Fu Barr: everybody know what an UUID is&lt;br /&gt;
 [12:54]  Fu Barr: +?&lt;br /&gt;
 [12:54]  Kelso.Uxlay @hg.creanovale.ca:8052: Unique identifier&lt;br /&gt;
 [12:55]  Fu Barr: basically it&amp;#039;s the unique number each and every item in opensim gets&lt;br /&gt;
 [12:55]  Drang.Po @kalasiddhigrid.com:8002: ea82195b-47cb-4dbe-b33a-b092f0b3f8ea&lt;br /&gt;
 [12:55]  Fu Barr: all our prims have one, and it&amp;#039;s guaranteed to be different&lt;br /&gt;
 [12:55]  Fu Barr: always unique&lt;br /&gt;
 [12:55]  Fu Barr: and the last parameter like some have already said is the message &lt;br /&gt;
 [12:56]  Fu Barr: now most of you who have done some scripting probably know this already etc. but i ask you to bare with me on this. like i said it&amp;#039;ll keep me  sane later on as i can say - oops we spokeaout his already you&amp;#039;re asling me a stupid questino :)&lt;br /&gt;
 [12:57]  Fu Barr: so if we look at the fuction signature, we can see something interesting&lt;br /&gt;
 [12:57]  Fu Barr: and it&amp;#039;s called &amp;#039;filtering&amp;#039;&lt;br /&gt;
 [12:57]  Fu Barr: we can tell llListen() to only listen to certain prims, or to all prims&lt;br /&gt;
 [12:57]  Fu Barr: for example&lt;br /&gt;
 [12:58]  Fu Barr: if we would write the following...&lt;br /&gt;
 [12:58]  Fu Barr: llListen(789, &amp;quot;&amp;quot;, NULL_KEY, &amp;quot;&amp;quot;)&amp;#039;&lt;br /&gt;
 [12:58]  Fu Barr: what/who will the listening prim actually listen to?&lt;br /&gt;
 [12:58]  dan banner: anyone&lt;br /&gt;
 [12:58]  Fu Barr: half-correct&lt;br /&gt;
 [12:59]  Kelso.Uxlay @hg.creanovale.ca:8052: anything&lt;br /&gt;
 [12:59]  Fu Barr: still half -correct&lt;br /&gt;
 [12:59]  Fu Barr: yes, anything, but ONLY only on channel 789&lt;br /&gt;
 [12:59]  Romulun Rockett: any other prim?&lt;br /&gt;
 [12:59]  Fu Barr: how about this:&lt;br /&gt;
 [13:00]  Fu Barr: llListen(789, &amp;quot;Fus Idiot Prim&amp;quot;, NULL_KEY, &amp;quot;&amp;quot;);&lt;br /&gt;
 [13:00]  Thirza Ember is Offline&lt;br /&gt;
 [13:00]  Scooby Scorfield is Offline&lt;br /&gt;
 [13:00]  Romulun Rockett: any other prim using that channel???&lt;br /&gt;
 [13:00]  Fu Barr: nope&lt;br /&gt;
 [13:00]  Kelso.Uxlay @hg.creanovale.ca:8052: would accept message only from prim Fus Idiot Prim&lt;br /&gt;
 [13:00]  Fu Barr: exactly&lt;br /&gt;
 [13:01]  Fu Barr: but still only on that channel 789&lt;br /&gt;
 [13:01]  Romulun Rockett: ok :):)&lt;br /&gt;
 [13:01]  Fu Barr: the 2nd parameter in the function signature is the source of the the talking&lt;br /&gt;
 [13:01]  Fu Barr: i refer you all to the SL wiki for the rest but the idea of &amp;#039;filtering&amp;#039; the listen should be clear&lt;br /&gt;
 [13:02]  Fu Barr: now the question is: why bother&lt;br /&gt;
 [13:02]  Fu Barr: just listen on channel 789 and be done with ot&lt;br /&gt;
 [13:02]  Fu Barr: *it&lt;br /&gt;
 [13:02]  Fu Barr: the answer lies for the most part in the opoesnim server load thing&lt;br /&gt;
 [13:03]  Fu Barr: liek we said lsitens etc. are scheduled and handled by the opensim local server&lt;br /&gt;
 [13:03]  Fu Barr: and if say you&amp;#039;re asking your prims to listen to channell 0 - then all the chat has to go to all the prims.&lt;br /&gt;
 [13:03]  Fu Barr: it pays to try and limit the scope of your talking&lt;br /&gt;
 [13:03]  Fu Barr: also helps with limiting cross talk etc.&lt;br /&gt;
 [13:04]  Fu Barr: right. so now we know how to llSay, llOwnerSay and how to llListen()&lt;br /&gt;
 [13:04]  Fu Barr: now we need to actuall piece it all together&lt;br /&gt;
 [13:04]  Fu Barr: for which we need one more opensim concept&lt;br /&gt;
 [13:04]  Fu Barr: the Event&lt;br /&gt;
 [13:05]  Fu Barr: opensim code is &amp;#039;event driven&amp;#039;&lt;br /&gt;
 [13:05]  Jeff Hall: u dont talk about listen handle FU?&lt;br /&gt;
 [13:05]  Fu Barr: lol - that IS what I;m talking about :)&lt;br /&gt;
 [13:05]  Fu Barr: so...&lt;br /&gt;
 [13:06]  Fu Barr: here we go&lt;br /&gt;
 [13:06]  Jeff Hall: sorry i didnt see the handing&lt;br /&gt;
 [13:06]  Fu Barr: when we setup the llListen()&lt;br /&gt;
 [13:06]  Fu Barr: we also prepare the listening prim to &amp;#039;react&amp;#039; when it hears something&lt;br /&gt;
 [13:07]  Fu Barr: &amp;#039;hearing something&amp;#039; is an &amp;#039;event&amp;#039;&lt;br /&gt;
 [13:07]  Fu Barr: there are other events&lt;br /&gt;
 [13:07]  Fu Barr: many of them&lt;br /&gt;
 [13:07]  Fu Barr: like:&lt;br /&gt;
 [13:07]  Fu Barr: touching&lt;br /&gt;
 [13:07]  Fu Barr: colliding&lt;br /&gt;
 [13:07]  Fu Barr: moving&lt;br /&gt;
 [13:07]  Fu Barr: all sorts of things that can happen in opensim&lt;br /&gt;
 [13:07]  Fu Barr: or SL for that matter&lt;br /&gt;
 [13:08]  Fu Barr: the llListen sets up the &amp;#039;event&amp;#039; for listening and then when that event actually happens, we need to &amp;#039;handle&amp;#039; it&lt;br /&gt;
 [13:08]  Fu Barr: the notion of &amp;#039;Events&amp;#039; and handling them ins v important to get straight in your mind.&lt;br /&gt;
 [13:08]  Fu Barr: if you&amp;#039;re a novice scripter&lt;br /&gt;
 [13:09]  Fu Barr: this will be your first major headache&lt;br /&gt;
 [13:09]  Fu Barr: the 2nd will be understanding &amp;#039;states&amp;#039;&lt;br /&gt;
 [13:09]  Fu Barr: the 3rd will be &amp;#039;debugging&amp;#039;&lt;br /&gt;
 [13:09]  Fu Barr: those headaches we&amp;#039;ll leave for the next classes&lt;br /&gt;
 [13:09]  Fu Barr: :)&lt;br /&gt;
 [13:09]  Fu Barr: so back to events&lt;br /&gt;
 [13:10]  Fu Barr: the event handler for llListen is &amp;#039;listen&amp;#039;&lt;br /&gt;
 [13:10]  Fu Barr: no imagination these LindenLabs types...&lt;br /&gt;
 [13:11]  Fu Barr: anyhow i;m not going to go through the whole dance but i should be clear that listen has v similar parameters to llListen()&lt;br /&gt;
 [13:11]  Fu Barr: in fact:&lt;br /&gt;
 [13:11]  Fu Barr: listen(integer channel, string name, key uuid, string msg)&lt;br /&gt;
 [13:11]  Fu Barr: would do the trick&lt;br /&gt;
 [13:12]  Fu Barr: the pait have the IDENTICAL singnature - one sets up the event, one handles the event&lt;br /&gt;
 [13:12]  Fu Barr: *pair&lt;br /&gt;
 [13:12]  Fu Barr: they work in tanden&lt;br /&gt;
 [13:12]  Fu Barr: *tandem&lt;br /&gt;
 [13:12]  Fu Barr: llListen() means there&amp;#039;s going to ba a listen someplace in your code&lt;br /&gt;
 [13:12]  Fu Barr: listen() means there needs to be a llListen() to make it relevant&lt;br /&gt;
 [13:13]  Fu Barr: now lets see how this works in code.&lt;br /&gt;
 [13:13]  Fu Barr: and in your prims&lt;br /&gt;
 [13:13]  Fu Barr: oh, any questions so far?&lt;br /&gt;
 [13:13]  Jeff Hall: no but sorry if i was too fast Fu&lt;br /&gt;
 [13:13]  Jeff Hall: :)&lt;br /&gt;
 [13:13]  Fu Barr: none. excellent i must be the BEST teacher EVVAH!&lt;br /&gt;
 [13:13]  michaelboyd dresler is Online&lt;br /&gt;
 [13:14]  Fu Barr: :)&lt;br /&gt;
 [13:14]  Fu Barr: okay - lets setup one cube as a talker first&lt;br /&gt;
 [13:14]  Jeff Hall: was searching for the hnadle&lt;br /&gt;
 [13:14]  Jeff Hall: handle&lt;br /&gt;
 [13:14]  Fu Barr: pick one of your cubes&lt;br /&gt;
 [13:14]  Mirror Amorasi is Online&lt;br /&gt;
 [13:14]  Drang.Po @kalasiddhigrid.com:8002: will the uuids work on different grids? even thou they were assigned by the database on the &amp;#039;home&amp;#039; grid?&lt;br /&gt;
 [13:15]  Jeff Hall: hahha&lt;br /&gt;
 [13:15]  Fu Barr: correct. uuids are grid specific&lt;br /&gt;
 [13:15]  Fu Barr: now in my case my llSay might be like this: llSay(-1234, &amp;quot;speak&amp;quot;);&lt;br /&gt;
 [13:15]  Drang.Po @kalasiddhigrid.com:8002: so you would have to redo the prims and code for each grid in order to work&lt;br /&gt;
 [13:15]  Jeff Hall: https://betterexplained.com/articles/the-quick-guide-to-guids/&lt;br /&gt;
 [13:16]  Fu Barr: yes and no :)&lt;br /&gt;
 [13:16]  Fu Barr: we&amp;#039;ll see that when we get to the listener prim :)&lt;br /&gt;
 [13:16]  Fu Barr: now i;m going to move to my listener prim and add my llListen like so:&lt;br /&gt;
 [13:16]  Fu Barr: llListen(-1234, &amp;quot;&amp;quot;, NULL_KEY, &amp;quot;&amp;quot;);&lt;br /&gt;
 [13:16]  Mirror Amorasi is Offline&lt;br /&gt;
 [13:17]  Fu Barr: which means the prim is going tolisten to everything on that channel&lt;br /&gt;
 [13:17]  Azi Az is Online&lt;br /&gt;
 [13:17]  Nik Yer is Offline&lt;br /&gt;
 [13:17]  Fu Barr: whihc is fine as there&amp;#039;s only one thing so chat traffic is going to be minimal&lt;br /&gt;
 [13:17]  Koni Lanzius is Online&lt;br /&gt;
 [13:17]  Fu Barr: then i;m going to setup my listen like so:&lt;br /&gt;
 [13:18]  Fu Barr: listen(integer channel, string name, key uuid, string msg)&lt;br /&gt;
 [13:18]  Fu Barr: and now it all breaks and i go home disenchanted&lt;br /&gt;
 [13:18]  Fu Barr: :(&lt;br /&gt;
 [13:18]  Fu Barr: the problem is that i havent yet told you how the handler really needs to be written&lt;br /&gt;
 [13:19]  Fu Barr: we just looked at the function signature&lt;br /&gt;
 [13:19]  Fu Barr: this is that the listen relly lookslike:&lt;br /&gt;
 [13:19]  Fu Barr: listen(integer channel, string name, key uuid, string msg) { llOwnerSay(&amp;quot;I heard something):}&lt;br /&gt;
 [13:19]  Fu Barr: oops : is a ;&lt;br /&gt;
 [13:20]  Fu Barr: the listen is its onw code block and you can/have to callfunctions insode that code block to make the handler _do_ something&lt;br /&gt;
 [13:20]  Fu Barr: *own&lt;br /&gt;
 [13:20]  Fu Barr: so the flow is:&lt;br /&gt;
 [13:21]  Fu Barr: 1. setup llListen() in target prim&lt;br /&gt;
 [13:21]  Fu Barr: 2. user llSay() to say something into channel&lt;br /&gt;
 [13:21]  Fu Barr: 3. handle the listen even in the target prim, in its own code block.&lt;br /&gt;
 [13:22]  Fu Barr: it really is a conversation&lt;br /&gt;
 [13:22]  snowbody Cortes is Online&lt;br /&gt;
 [13:22]  Fu Barr: i guess i&amp;#039;ve lost all of you but, if not, i&amp;#039;ll post the code for each prim source and target and you can copy paste it into your prims and see how  it works.&lt;br /&gt;
 [13:23]  Fu Barr: here we go: (give me a sec to type it out)&lt;br /&gt;
 [13:23]  Object: Script running&lt;br /&gt;
 [13:24]  Fu Barr: this is my source script:&lt;br /&gt;
 &amp;lt;source lang=&amp;quot;lsl&amp;quot;&amp;gt; default {&lt;br /&gt;
 state_entry() {&lt;br /&gt;
 llSay(-1234, &amp;quot;Hello&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
 [13:24]  Romulun Rockett: that sounds helpfull :)&lt;br /&gt;
 [13:25]  Fu Barr: default {&lt;br /&gt;
 state_entry() {&lt;br /&gt;
 llListen(-1234, &amp;quot;&amp;quot;, NULL_KEY, &amp;quot;&amp;quot;);&lt;br /&gt;
 }&lt;br /&gt;
 listen(integer channel, string name, key uuid, string msg) {&lt;br /&gt;
 llOwnerSay(&amp;quot;Heard something&amp;quot;); &lt;br /&gt;
 }&lt;br /&gt;
 }&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
 [13:25]  Fu Barr: copy paste that in your cubes.... first the target one with the listens, then the source one with the llasy&lt;br /&gt;
 [13:25]  Fu Barr: llSay&lt;br /&gt;
 [13:25]  Nik Yer is Online&lt;br /&gt;
 [13:26]  Fu Barr: if you did it the other way around,&lt;br /&gt;
 [13:26]  Fu Barr: just &amp;#039;reset&amp;#039; or resave your llSay cube&lt;br /&gt;
 [13:26]  Mirror Amorasi is Online&lt;br /&gt;
 [13:26]  Fu Barr: who&amp;#039;s got it working?&lt;br /&gt;
 [13:26]  Object: Script running&lt;br /&gt;
 [13:26]  Jeff Hall: i made it working  with touch start instead&lt;br /&gt;
 [13:26]  Fu Barr: obviously you need to change the channel number to your won&lt;br /&gt;
 [13:26]  Object: Script running&lt;br /&gt;
 [13:27]  Object: Script running&lt;br /&gt;
 [13:27]  Fu Barr: fair enough jeff, but we hadn&amp;#039;t looked at that event yet :)&lt;br /&gt;
 [13:27]  Ni says  she loves Hans: Script running&lt;br /&gt;
 [13:27]  Fu Barr: but i may have jumped the gun alittle&lt;br /&gt;
 [13:27]  Hans isnt worth loving: Script running&lt;br /&gt;
 [13:27]  SillyAv: Hello World, Hello dan, Hello all&lt;br /&gt;
 [13:27]  Fu Barr: perhaps i should have started with touch_end first... oh well, you live and learn&lt;br /&gt;
 [13:28]  Hans Nerido: i like you too Lou !!!&lt;br /&gt;
 [13:28]  Total Sorbet: hehe&lt;br /&gt;
 [13:28]  Hans says he loves Ni: Heard something&lt;br /&gt;
 [13:28]  Nox.Darkness @login.greatcanadiangrid.ca:8002 is Offline&lt;br /&gt;
 [13:28]  Fu Barr: well hans&amp;#039;s prim seems to be working&lt;br /&gt;
 [13:28]  Fu Barr: :)&lt;br /&gt;
 [13:28]  Hans Nerido: :-))&lt;br /&gt;
 [13:28]  Jeff Hall: haha&lt;br /&gt;
 [13:28]  Nox.Darkness @login.greatcanadiangrid.ca:8002 is Online&lt;br /&gt;
 [13:29]  Jeff Hall: love is nice he?:)&lt;br /&gt;
 [13:29]  Fu Barr: well - all the code is right there - well if you&amp;#039;re isent - all i can say welcome to your first taste of headache number 3 - debugging :)&lt;br /&gt;
 [13:29]  Fu Barr: *your&amp;#039;s isnt working&lt;br /&gt;
 [13:30]  Fu Barr: anyhow - this is about as much time as i have for this session - pleasemuck aounrd with the little bits of code if you&amp;#039;re a novice, see if you can   make it work.&lt;br /&gt;
 [13:30]  Total Sorbet: good lesson fu&lt;br /&gt;
 [13:30]  Total Sorbet: ty&lt;br /&gt;
 [13:30]  Stewie Allen is Online&lt;br /&gt;
 [13:30]  Kelso.Uxlay @hg.creanovale.ca:8052: thanks&lt;br /&gt;
 [13:30]  Fu Barr: feel free to IM/message me if im in world i;m happy to answer questins&lt;br /&gt;
 [13:30]  Hans Nerido: 1 question Fu&lt;br /&gt;
 [13:30]  Jeff Hall: nice and ty Fu&lt;br /&gt;
 [13:30]  Ni Lemon: Great lesson Fu, thank you so much&lt;br /&gt;
 [13:30]  Kelso.Uxlay @hg.creanovale.ca:8052: When is the next lesson?&lt;br /&gt;
 [13:30]  Hans Nerido: is there a max range for this scripts&lt;br /&gt;
 [13:30]  Azi Az: Hi all.....seems i came late&lt;br /&gt;
 [13:30]  Fu Barr: we&amp;#039;ll do some more evetns etc. in the next lesson make it all a bit more &amp;#039;useful&amp;#039; and less beginner-y&lt;br /&gt;
 [13:31]  Nik Yer is Offline&lt;br /&gt;
 [13:31]  Hans Nerido: most scripts has an max range from 96 meters&lt;br /&gt;
 [13:31]  Fu Barr: okay - i need to head back to my RL - thanks for joining in, i guess we&amp;#039;ll schedule and publicise the n&lt;/div&gt;</summary>
		<author><name>Osgridadmin</name></author>
	</entry>
</feed>