Keep Informed

Entries in Weekly Chat (10)

Tuesday
Feb152011

Chat Session Feb. 14th, 2011

[20:00] Antonius: Hello MiceOnABeam group members! Time for the Monday chat. If you have any questions on the MiceOnABeam tool please join in.
[20:01] Arielmo: I have a error
[20:01] Arielmo: //ERR:                   ^ COMMA expected
[20:01] Antonius: Hi Arielmo!
[20:01] Arielmo: Hi =)
[20:02] Antonius: Seems that MiceOnABeam is telling you that there is an LSL coding error.
[20:02] Arielmo: Yes
[20:03] Antonius: What is the code it's complaining about?
[20:03] Arielmo:
llSetColor (<0.0,1.0,0.0>);
//ERR:                                    ^ COMMA expected
[20:03] Arielmo: i'am learning still
[20:03] Antonius: Of course, no problem
[20:03] Arielmo: i think my code is wrong
[20:04] Antonius: Well llSetColor has two parameters that you have to supply; you're only supplying one.
[20:04] Arielmo: Ohhhh yes
[20:04] Arielmo: i forgot
[20:04] Arielmo: =)
[20:05] Antonius: If you type a comma after the color vector, MOAB's code completion list will pop up and will show you the syntax of the LSL function.
[20:06] Antonius: Here is the correct call: llSetColor(<0.0,1.0,0.0>,ALL_SIDES)
[20:07] Arielmo: I want make a green light turning on and off every 1 seconds, i put the timer in transition or in state?
[20:09] Arielmo: Is a alarm light
[20:09] Arielmo: With Sound and Glow
[20:09] Antonius: To use a timer, you have to do two things: First start the timer with a call to llSetTimerEvent(1.0)
[20:09] Antonius: You can put the timer start function in a state or transition depending on your needs.
[20:10] Antonius: Secondly, to receive the timeout, you have to create a transition that is set to the timer event.
[20:11] Arielmo: Thanks
[20:11] Antonius: Have you taken a look at the tutorial https://miceonabeam.fogbugz.com/default.asp?W7
[20:11] Antonius: The tutorial creates a simple light that transitions between colors based on a timer. Pretty similar to what you're trying to do.
[20:14] Antonius: If you haven't already, try going through the tutorial. It covers a number of the basics.
[20:16] Antonius: Do you have any other questions in building your alarm light?
[20:17] Arielmo: i'am just trying learn about scripts, i think i need learn first how work a script, later i can use the MiceOnABeam
[20:20] Antonius: You can create a real simple MiceOnABeam model that has a timer- Very easy. Hold on.
[20:23] Antonius: I'm just putting a MOAB model together to show you.
[20:23] Arielmo: U know where have classes about scripts in SL?
[20:25] Antonius: There's a number of places that hold scripting classes. You can do a quick search for them. Someone recommended one to me I'll try to get for you.
[20:26] Arielmo: ok
[20:26] Antonius: It's: ishkiia studios
[20:28] Arielmo: i will start a class in real life this month, but is a long time to finish
[20:29] Antonius: Arielmo, take a look at the following: http://screencast.com/t/w5aJrKafe
[20:30] Arielmo: Loading
[20:33] Arielmo: Great, thank you very much Antonius... I think i can put sounds
[20:34] Antonius: The model has just two states, one for each of the two colors you want.
[20:34] Arielmo: i understand
[20:34] Antonius: The timer is started in the Initial Transition that goes to the Green state.
[20:35] Antonius: The two timer transitions handle the timer event and switch back and forth between the states.
[20:35] Arielmo: Now i will just input llPlaySound in Green State
[20:36] Antonius: Yes, exactly. The Entry Action code of the state will be executed whenever the state is entered.
[20:36] Antonius: If you need something to happen just when you exit the state, put the code in the Exit Action.
[20:36] Arielmo: I will see all the lines of the script to try to understand how work the timer event
[20:37] Antonius: Sure.
[20:37] Arielmo: first i need make the script in MOAB
[20:38] Arielmo: How u make a llSetTimerEvent in the transition to First State?
[20:41] Antonius: Select Edit Properties of the transition to open up it's property editor and then enter in the code in the Transition Action section.
[20:41] Arielmo: is possible make the script just with the codes?
[20:41] Arielmo: Less the //lines and other codes
[20:42] Arielmo: Only my code so i can see how work
[20:42] Antonius: In the Script top-level menu there is the Generate LSL (Optimized) menu item. Select that one to produce code without the comments.
[20:43] Arielmo: ok
[20:44] Antonius: In looking at the code, you will see that that separate functions are created for the Entry Action code of each state.
[20:45] Antonius: Events are handled at the end of the script. You can see the timer() event and how depending on which state is active, a call is made to the appropriate state function.
[20:52] Arielmo: If u will make the same script
[20:52] Arielmo: Using only the SL editor
[20:52] Arielmo: the script have less lines right?
[20:54] Antonius: Yes that's true. Because MOAB has so many features and can handle some very complex modeling scenarios, there is a basic overhead that is part of the script.
[20:54] Arielmo: Yes
[20:55] Antonius: I will be optimizing the code generation so the overhead should become less over time.
[20:55] Antonius: In fact the next release has some improvements here.
[20:55] Arielmo: but the script of MOB is working perfectly
[20:57] Antonius: I'm glad it is!!  That's the benefit of MOAB in that it let's people who are not experts in scripting, do the scripting in a more visual way.
[20:58] Arielmo: Really is very good, i am trying learn about scripts a long time
[20:58] Arielmo: Just with MOAB i can learn
[20:59] Antonius: I'm focussing the next release of MOAB on new scripters. So for example instead of typing in llSetColor.... you can select this action from a menu, fill in a form, and MOAB will automatically generate the code for you.
[21:00] Arielmo: Great
[21:00] Antonius: Take a look at: http://www.screencast.com/t/U92duQYQmHO
[21:01] Antonius: This shows you how you will be able to set the color of a prim in the next release without entering in llSetColor.
[21:01] Arielmo: is better to newbies like me
[21:01] Arielmo: lol
[21:01] Arielmo: Hey Antonius, the initial point in MOAB is a code?
[21:03] Antonius: The Initial Point is part of every state in a model, and you draw a transition from the Initial Point to a state to indicate the state to start-up in.
[21:04] Arielmo: But the initial point is in outside of state
[21:05] Antonius: Each model has a top state, and the initial point when you first open a model is the one for the top state.
[21:05] Antonius: One of the features of MOAB is that you can have states WITHIN states.
[21:05] Arielmo: Ohhhh, the empty file is one state?
[21:06] Antonius: Yes, an empty model has a built-in top state.
[21:07] Antonius: If you select one of your states and right-click to get the context menu, select Open State.
[21:08] Arielmo: Fantastic
[21:08] Antonius: Then you will see inside the state, and you will see another Initial Point. If you wanted, you could add additional states inside there, and the Initial Point would indicate which state to start up in.
[21:09] Antonius: Now in the case of a Composite State (a state with states inside) you don't always have to connect to the Initial Point as you may get to a sub-state through an Entry Point, but that's a bit more advanced.
[21:10] Arielmo: i understand
[21:10] Antonius: You can read all about it here: https://miceonabeam.fogbugz.com/default.asp?W31
[21:13] Antonius: The documentation has lots of material if you want to do more advanced stuff. Take a look at it if you haven't already: https://miceonabeam.fogbugz.com/default.asp?W1
[21:14] Antonius: Anyways, time to sign off. I hope this has been helpful for you.
[21:15] Arielmo: this is very important for me, and i dont know how i thank you
[21:16] Arielmo: i'am trying learn about scripts in a lot of years... Just now i know understand a little
[21:17] Antonius: No problem at all.
[21:19] Arielmo: The Light is my first script.... In a long time i want learn with you how i make scripts more hard
[21:20] Antonius: Great! Thanks. Chat again soon! You can always IM me or send a question to support@miceonabeam.com
[21:20] Antonius: I will be happy to help you again.
[21:20] Antonius: Bye!!
[21:20] Arielmo: ok
[21:20] Arielmo: thanks
[21:20] Arielmo: bye


Monday
Jan032011

Chat Session Jan. 3rd 2011

[20:00] Antonius: Hello MiceOnABeam group members. Time for the Monday chat. If you have any questions on the MiceOnABeam tool please join in.
[20:01] Antonius: I'll be here for the next hour to answer any questions that you may have.
[20:20] Jorie: i think you answer our questions so well
[20:20] Jorie: we all quiet
[20:20] Jorie: =)
[20:20] Jorie: you have a good new year anton?
[20:20] Antonius: Hi Jorie! How are you?
[20:20] Jorie: doing good
[20:21] Antonius: Yes, it's been busy, but good.
[20:21] Jorie: waiting eagerly to hear bout new udates
[20:21] Antonius: Things are going well. Feature development is completed.
[20:22] Antonius: I'm currently working on library components, etc for the new release which will take awhile.
[20:22] Jorie Muircastle nods
[20:22] Jorie: lots of stuff there
[20:22] Antonius: With testing and documentation we're probably looking at Feb for the release.
[20:23] Antonius: How's your work with MiceOnABeam going? Are you still doing all that mesh stuff?
[20:23] Jorie: still doing alot of mesh.. but trying to learn on the side
[20:24] Antonius: I wish I was talented enough to do mesh...
[20:24] Jorie: i wish i was talented enough to script
[20:25] Antonius: LOL!
[20:25] Antonius: Any MOAB questions Jorie?
[20:26] Jorie: no.. well.. one... but its more of a script script question...
[20:26] Antonius: Well ok. Maybe it's something I know.
[20:26] Jorie: for example .. i am working on a hottub.. all prims are linked.. I want the particles to target the object water.. also linked
[20:26] Jorie: how do i do that.. without having to write a link number in the script...
[20:27] Jorie: i tried it with channel say..but...then 5 hottubs have the same communicatiion
[20:28] Antonius: Hmmm. Well each bathtub could create a random channel that registers with it's components on rez.
[20:29] Jorie: would you be able to make an example of random channels in a tutorial later?
[20:29] Antonius: So the water would generate a channel and broadcast to all it's linked prims.
[20:30] Jorie Muircastle listens
[20:30] Antonius: Generating a random channel is not hard.
[20:31] Jorie: boggles my brain but ill keep reading into it =)
[20:31] Antonius: Hold on a min.
[20:32] Antonius: I believe I have a model example which does that.
[20:32] Jorie: ooh neat
[20:33] Antonius: ListenChannel = 1 + (integer)llFrand(999-100+1);
[20:33] Jorie: ahh thanks antonious
[20:33] Antonius: That will give you a random channel between 100 & 1000
[20:35] Antonius: You can look up llFrand for more details: http://wiki.secondlife.com/wiki/LlFrand
[20:35] Jorie: thanks again
[20:37] Antonius: Have you put together a MiceOnABeam model for the hottub (laser show?) ?
[20:38] Jorie: actually put it together outside of mice.. couldnt figure how to do it in mice just of yet but had plans to convert it and add it for others
[20:39] Antonius: How many different scripts are needed for your design?
[20:40] Jorie: thats what i got together so far
[20:41] Antonius: Got them. I'll take a look when I get a chance and give you some suggestions for a MOAB model.
[20:41] Jorie: awesome!
[20:42] Antonius: Generally, for each script you need, you would create a separate MOAB model.
[20:46] Jorie Muircastle nods
[20:46] Antonius: I took a quick look at then. They're relatively small one or two state scripts.
[20:46] Jorie: im hoping to make more efficient
[20:47] Antonius: How many distinct controls are there for your hottubs?
[20:47] Jorie: 3
[20:47] Jorie: water up and down, jets and steam
[20:48] Antonius: Any other touchable areas?
[20:48] Jorie: just those 3
[20:50] Antonius: Well generally speaking without having looked too deeply at your design, you have a choice between having separate scripts i.e., MOAB models, for each of the controls or forwarding control requests to a single script, i.e., model, to handle it all.
[20:51] Jorie: more like a menu?
[20:52] Antonius: If there's alot of coordination required between the controls, i.e, if one is on, the other is inactive, then it might make sense to have just one larger model to coordinate the actions. It would be simpler to do this.
[20:52] Jorie: they can all 3 be on at same time
[20:53] Antonius: Yes you could use a menu in a single script, or you could still have very simple scripts for the controls that respond to the user's touch and forward on the action to the main script model.
[20:54] Antonius: If they are completely independent you might just want three separate scripts/models.
[20:54] Jorie: ill read more and keep trying then.. you gave alot of food for thought
[20:56] Antonius: Good.
[20:56] Antonius: Glad to have been of help Jorie.
[21:03] Antonius: Well time to sign off. Thanks for joining in Jorie. Chat again soon.