Keep Informed

Entries in Internal Self Transitions (1)

Tuesday
Aug092011

MUG Meeting August 15th, 2011

[17:14]  Pilot: G'day Ant.. Slept in mate, sorry... lol
[17:14]  Antonius: Well G'day Pilot!
[17:14]  Pilot: What's happenin'?
[17:14]  Antonius: I was just trying to get up on the board a script model I did for Jorie.
[17:14]  Antonius: Can you see it?
[17:15]  Antonius: Here's the link if not: http://screencast.com/t/0OAJqXnFn
[17:15]  Pilot: Idle, wait for permission, Stance, Attack....?
[17:15]  Antonius: It's a weapon script.
[17:16]  Pilot: Can't see it mate, lol.
[17:16]  Pilot: hahaha
[17:16]  Pilot: Looks good.
[17:16]  Antonius: draw sword
[17:16]  Antonius: On Guard!
[17:16]  Pilot: Geeze louize mate, I was only kiddin'
[17:16]  Pilot: lol
[17:17]  Antonius: Seems to work.
[17:17]  Antonius: You can configure the model to add in your own animations.
[17:17]  Pilot: But ya don't need to ask permissions each time you draw it.
[17:18]  Antonius: That was the happy animation. Watch when I miss.
[17:18]  Antonius: I sigh....
[17:18]  Antonius: Then when I put it away.....
[17:18]  Antonius: sheath sword
[17:18]  Antonius: Peace bro.
[17:18]  Pilot: lol...
[17:19]  Pilot: Bringin' a knife to a gun fight, lmao.
[17:19]  Antonius: Yes you're right about the permission test. But sometimes it can be simpler to simply do the test all the time.
[17:22]  Antonius: I'm waiting for Jorie to give me feedback on the weapon model and then I'll give it away.
[17:23]  Antonius: It shows how you can use the configuration feature.
[17:23]  Pilot: I'll have to look at weapons soon, but over the last week it has been mayhem here.
[17:24]  Antonius: Take a look at the configuration: http://screencast.com/t/MwDfRABz
[17:25]  Pilot whispers: You got a weapons "configurator" (lol
[17:28]  Pilot: Now, this configuator,lol.. looks good!
[17:29]  Antonius: You can configure the State Variables of any state in this way.
[17:31]  Pilot: This tool is in 1.0.3?
[17:31]  Antonius: It's already in v1.0.2.
[17:31]  Antonius: Do you understand how to setup configuration for a State Variable?
[17:32]  Antonius: It's that Configure checkbox column in the state variables editor
[17:32]  Pilot: Oh.... Oops, no mate, I just setup varibles anywhere I can mate... lol... Here comes my lack of knowledge again, lol.
[17:33]  Pilot: Geeze louize...
[17:33]  Antonius: There's a section on it in the docs for full details: https://miceonabeam.fogbugz.com/default.asp?W112
[17:34]  Pilot: Holy smoke!!!
[17:34]  Antonius: It's great when you have a state that you want to re-use, you can set up one or more of it's state variables to be configurable.
[17:34]  Pilot: lol.. Never used that!
[17:35]  Antonius: Then when you import or copy the state, you open up the Configuration Wizard to set values for the variables using a form!
[17:36]  Pilot: Didn't know what it was about! As I was finding my way, the check box didn't come up, lol.
[17:38]  Sally: hey everyone °?°
[17:38]  Pilot: G'day Sally
[17:38]  Sally: Gday Mate!!
[17:38]  Antonius: Hello Sally & welcome!
[17:39]  Antonius: I was just talking with Pilot about the State configuration feature in MiceOnABeam.
[17:39]  Pilot: Stone the crows... Ant, lookout! Another Aussie, lol.
[17:39]  Antonius: It's a bit more advanced topic.
[17:39]  Sally: lol yep
[17:39]  Antonius: Are you from downunder Sally?
[17:39]  Sally: yep
[17:39]  Sally: live in the usa tho
[17:39]  Pilot: Can't hide it, lol.
[17:40]  Pilot: Poor bugger...
[17:40]  Pilot: Could be worse...
[17:40]  Pilot: Could be in Canada, lmao....
[17:40]  Sally: yeah .. could live in New Zealand
[17:40]  Pilot: (Antonius is Canadian), lol.
[17:40]  Antonius: Be careful. Beavers can bite.
[17:41]  Pilot: New Zealand??? holy smoke!! Wouldn't wish that onya mate!
[17:41]  Sally: oh you should be enjoying your summmer ... all two weeks of it !
[17:41]  Pilot: lol.
[17:41]  Antonius: We've had lots of hottish weather here this summer 25-35C, but Pilot tells me that's cold.
[17:42]  Sally: yeha we'd still be wearing our coats at that temperature
[17:42]  Pilot: Bloody freezin' mate. We have had those temps all weekend and it is winter here.
[17:42]  Antonius: ha-ha. Well, we're hardier that way.
[17:43]  Pilot: I'm inland and a few hundred miles NW of Sydney Sal, fyi :)
[17:43]  Antonius: So Sally, have you used MiceOnABeam much?
[17:43]  Sally: I have started playing with it
[17:43]  Sally: I think the learning curve may pay off
[17:43]  Sally: so what's the news .. when is 1.03 coming out?
[17:43]  Antonius: Still working on it & a fair bit to do yet. I'm planning for a Fall release.
[17:44]  Antonius: Did you see the Sneak Peek of v1.0.3 features?
[17:44]  Sally: yeah they seem good
[17:44]  Sally: are you building the check for undeclared variables in that one?
[17:45]  Pilot is only a noob scriptor and have done some experimenting. It's really good.
[17:45]  Antonius: I'm just working on the "undeclared identifiers" feature now. The error reporting system is done and should make life much easier too for users.
[17:45]  Sally: oh cool
[17:46]  Antonius: Probably going to put in a Join Point feature too so diagrams can be cleaner.
[17:46]  Pilot: You makin' fun of me again Ant??
[17:46]  Antonius: No Pilot, feedback from customers such as yourself is critical for me.
[17:46]  Pilot: :) (just havin' a dig again Ant, lol)
[17:46]  Sally: you know with it being a visual environment my general feedback is .. I need more visual feedback ... like .. show me if there are state variables and functions defiend
[17:47]  Sally: like look at that model there on the weapon ...
[17:47]  Antonius: Yes Sally I agree. So you're saying you would like another icon showing on the state to tell you that it has variables/functions defined for it.
[17:47]  Sally: there is no way to tell if there is a state variable or function defined at the top layer
[17:48]  Sally: unless i go in and check
[17:48]  Antonius: Good point.
[17:48]  Antonius: I will look into that.
[17:49]  Antonius: Sally, do you set the options to display Entry/Exit & Guards & transition actions?
[17:49]  Sally: yep I do
[17:49]  Antonius: I often start out with that, but end up turning it off due to excessive clutter.
[17:50]  Antonius: That would be my only concern. Would you prefer an icon, or info on the state like the entry/exit action indication?
[17:50]  Sally: icon .. the info is truncated anyway
[17:51]  Antonius: Ok. Should not be difficult to do.
[17:51]  Sally: Join point would be good do you mean on simple states?
[17:52]  Antonius: The Join point will be like an Entry Point, but can be created as a component inside a state's decomposition.
[17:53]  Antonius: So then you can have multiple transition into it, with a single transition out. Also like a Choice Point, except there will be no guard conditions on the transitions leaving the Join Point.
[17:53]  Sally: that would be good ... help clean up a lot
[17:54]  Pilot's head spins....
[17:54]  Antonius: Yes. I'm also hoping to add in the ability to have multiple bends in a transition.
[17:52]  Sally: im still on the learning curve ... the biggest issue I struggle with is the scope or lifetime of variables
[17:54]  Antonius: So to your question on variables...
[17:55]  Sally: if I have a listen event that transitions me to another state ... the listen params .. are only available to the transition action but not to the target state right?
[17:55]  Antonius: The scope of a state variable is confined to the state in which it is defined and all states contained within that state.
[17:55]  Sally: right
[17:55]  Sally: and event params?
[17:56]  Antonius: Event parms are directly accessible in the transition with the event (& new in v1.0.3 in transitions leaving a Choice Point where there is a single event transition into it).
[17:57]  Antonius: However, the event parms are also automatically saved and you can access them via the built-in EVENT_XXX functions.
[17:57]  Sally: the last event? ... is accessible in the target state?
[17:57]  Antonius: So if you transition to another state, you can still access the event arguments there using these functions.
[17:58]  Sally: awesome
[17:58]  Antonius: Yes, the most recent event is always saved.
[17:58]  Sally: that makes things easier
[17:58]  Antonius: Yes. See the following section in the docs.: https://miceonabeam.fogbugz.com/default.asp?W33
[17:59]  Sally: thanks
[17:59]  Sally: sorry for hogging the floor Pilot °?°
[17:59]  Antonius: No problem Sally. We all learn from each other!
[17:59]  Sally: the docs mention Internal Self Transitions ... how do you make those?
[18:00]  Sally: wherein, the entry and exit actions aren't fired
[18:00]  Pilot: Sal, I'm listenin' mate, don't you worry, lol.
[18:00]  Antonius: Internal self transitions are like regular self transitions except they bypass executing the exit & entry code of the state.
[18:01]  Sally: right so what's the trick for making one °?°
[18:01]  Antonius: You create them using the Transition Tool and clicking and dragging from the border of the State Editor for the state in question.
[18:01]  Antonius: ... to another point on the border.
[18:02]  Sally: ok so they still appear as arc on the outside of the state?
[18:03]  Antonius: No, they appear only on the inside. Take a look at this: http://screencast.com/t/G2fuf3pV2OWa
[18:03]  Pilot whispers: (Crikey! Don't ask me....)
[18:04]  Sally: for the life of me i can't get that to work do you have to drag inside the state?
[18:05]  Antonius: Select the transition tool....click and hold the mouse button on a spot on the INSIDE border....drag to another spot on the inside border.... and then release the mouse button.
[18:06]  Sally: oh damn !!
[18:06]  Sally: I just realized what I was doing wrong ...
[18:06]  Antonius: ??
[18:07]  Sally: I have been trying to do them on states without going inside the state
[18:07]  Antonius: Ahhh. Yes that would be it. :-)
[18:07]  Sally: like on that model there ... for state waitfor permisison
[18:07]  Sally: I would try to do the drag right there
[18:08]  Sally: but I need to Open the state first
[18:08]  Antonius: Yes since the self transition is inside the state.
[18:08]  Sally: doh !! °?°
[18:08]  Sally: hehehe
[18:09]  Antonius: It's not unreasonable what you thought to do. There is a UML feature which allows you to see what's inside the state from outside the state!
[18:09]  Antonius: It shows a miniature graphic of the decomposition from the outside.
[18:09]  Sally: right !
[18:09]  Pilot faints.......
[18:10]  Antonius: Poor Pilot.... LOL
[18:10]  Sally: giggles
[18:10]  Antonius: That's a great fainting aninmation Pilot!
[18:10]  Sally: you need some vegemite mate :0
[18:10]  Pilot: Ah man..... lmao... Got for it you 2!!! Good stuff!
[18:10]  Pilot: I need you 2 to keep talkin' lmao...
[18:11]  Antonius: When my talking gets too complex, Pilot routinely faints. :-)
[18:11]  Sally: hehehe
[18:11]  Pilot: :)
[18:11]  Pilot: Well, you know how stressed we Aussies can get, lol....
[18:12]  Antonius: I think our view here in Canada is how relaxed you all are. Paul Hogan, etc.
[18:12]  Pilot: :)
[18:12]  Sally: whats a good way of exiting a state without an LSL event taking place?
[18:12]  Sally: or .. does that mean that that state is probably useless?
[18:13]  Antonius: You're getting advanced there Sally. I think Pilot will faint for this one too.
[18:13]  Pilot: Keep talkin' you pair, lol.
[18:13]  Antonius: There are certain cases where you might want to do that.
[18:14]  Pilot: An undefined event will take you out of a state won't it?
[18:14]  Antonius: Normally an event takes you out of the state. But you can use a transition to a Final State to automatically generate an internal Completion Event for the state.
[18:15]  Antonius: Then you can exit the state by having a transition set to the Completion Event.
[18:15]  Sally: ahhhhh
[18:16]  Sally: but you would need at least one internal state inside that state right?
[18:16]  Antonius: So that means that you can transition out of a state that internally transitions (during the same event) to a Final State.
[18:16]  Antonius: It can be the Final State component.
[18:16]  Sally: so you could just draw a final state icon inside a state
[18:17]  Antonius: yes. and transition to it either from the Initial Point or via an Entry Point.
[18:17]  Sally: then exit via a completion event
[18:17]  Antonius: Correct.
[18:17]  Sally: cool
[18:18]  Antonius: Of course never have your completion transition redirected back to the state, as then you could end up with an infinite loop!
[18:19]  Sally: right
[18:20]  Antonius: I think I described this usage somewhere in the docs- just can't think exactly where right now.
[18:20]  Sally: any thought to making nested actions? °?°
[18:20]  Antonius: Nested actions?
[18:21]  Sally: like for instance .. I might want to give inventory to detected ... but then for the Item I might want to get the name of the first notecard in the inventory (which could also be an action)
[18:21]  Pilot whispers: Just passed a photo of my project to Sally...
[18:22]  Antonius: Hmmm. Might be complex to do.
[18:22]  Sally: So you could have an Action GiveSomething with an Action Get NotecardName assigned to the item
[18:23]  Antonius: What you can do of course is do the first action and assign the value to a variable and then when configuring the second action, enter in the variable name containing the value from the first action.
[18:23]  Sally: thats a good way to do it
[18:23]  Sally: that project looks pretty complicated Pilot °?°
[18:24]  Antonius: Of course you can always define your own action too that combines these two things.
[18:24]  Sally: right .. and just add a parameter for the type of thing you are looking for, for instance
[18:25]  Pilot: Minimum of typed code Sal, all done visually :)
[18:25]  Sally: cool bananas °?°
[18:25]  Antonius: yes. Defining your own action is only for experienced LSL users I would say though.
[18:26]  Antonius: Well Aussies, I think that's it for today.
[18:26]  Sally: oh I know what I was going to ask .. when I look at the generated code ... how do you come up with the state numners? °?°
[18:26]  Sally: I know I shouldn't be trying to figure out whats happening in the code °?°
[18:26]  Antonius: The code generator assigns them.
[18:27]  Sally: hard to break ol habits
[18:27]  Antonius: No you certainly can read the generated code (don't use the optimized version for this though).
[18:28]  Antonius: I actually designed it that way so people could read it.
[18:28]  Antonius: This section in the docs covers the layout of the generated code: https://miceonabeam.fogbugz.com/default.asp?W94
[18:28]  Sally: book marks it ;)
[18:28]  Sally: well thanks Ant, that was really helpful, and this tool has so much potential °?°
[18:28]  Pilot faints.....
[18:28]  Sally: next time I'll ask you about inter-prim communication :P
[18:29]  Antonius: np! Very nice meeting you Sally!
[18:29]  Sally: thank you °?°
[18:29]  Antonius: Pilot you can now form an Aussies MOAB group!
[18:29]  Pilot: That door project I gave you Sal will operate as many doors within listening range ... Thanks Sal :)
[18:29]  Sally: and Im looking forward to the HTTP IN component .. lol
[18:30]  Antonius: I'll take note.
[18:30]  Antonius: Do you play rugby Sally?
[18:30]  Sally: not me °?°
[18:30]  Pilot: Geeze Ant!!
[18:30]  Sally: windsurfer
[18:30]  Antonius: I thought I'd ask for Pilot. :-)
[18:30]  Sally: hahaha
[18:31]  Sally: ok im a geek girl
[18:31]  Pilot: Fair dinkum mate.. Ya don't ask Aussie girls that!
[18:31]  Sally: btu i dont play ruggers
[18:31]  Pilot: Maaaaaate....
[18:31]  Pilot: lmao
[18:31]  Pilot: That's like askin' them their age, lmao.
[18:31]  Pilot: They belt ya for that!
[18:31]  Pilot: lmao.
[18:31]  Antonius: I'm learning proper Aussie etiquette. Forgive me. My niece plays rugby.
[18:31]  Pilot: hahaha
[18:32]  Sally: or the Aussie comeback for asking that would be .. no Do you play Netball?
[18:33]  Antonius: I'll have to look that one up.
[18:33]  Pilot: Ah well... lmao.. Been great.... Great to meet you Sally....
[18:33]  Sally: great to me you two too
[18:33]  Sally: catch ya's later °?°
[18:33]  Antonius: Bye guys! Have a great week. If you have any questions, don't hesitate to ask if I'm online or send them to support@miceonabeam.com
[18:33]  Pilot: No worries mate.....
[18:34]  Sally: cheers
[18:34]  Pilot: Hooroo you two :)