Teachers and TeacherSetting Command

This forum is dedicated to everything about MemBrain Scripting. All Questions or other contributions with respect to scripting should be placed here.
Especially, if you have an interesting script that you might want to share with other MemBrain users, please post it within a new topic in this forum. Try to choose a title for your topic that allows other users to quickly identify the basic purpose of your script.
Post Reply
MrCreosote
Posts: 55
Joined: Wed 21. Jul 2010, 18:43

Teachers and TeacherSetting Command

Post by MrCreosote » Tue 2. Nov 2010, 20:28

Controlling Teachers via Script:

First, user can setup a custom teacher and simply SelectTeacher.

However, user may want to setup a teacher with script. Here I have some questions about TeacherSetting:

1) First, from the documentation, what are "the three versions of this function." (NOTE: also since this returns a "void" should it be called a Command?)

2) The ETeachSettings Names shown in the documentation are a subset of the settings in the Edit Teacher window. Are these Names the only settings that may be controlled by Script?

3) Are any Extended Teacher Properties controllable by Script?

Thanks so much,
Tom

User avatar
Admin
Site Admin
Posts: 438
Joined: Sun 16. Nov 2008, 18:21

Re: Teachers and TeacherSetting Command

Post by Admin » Wed 3. Nov 2010, 22:30

MrCreosote wrote:1) First, from the documentation, what are "the three versions of this function." (NOTE: also since this returns a "void" should it be called a Command?)
Depending on the type of teacher setting the function takes different parameter types. You can think of the function being able to be called with different data types depending on the parameter you want to influence.
MrCreosote wrote:2) The ETeachSettings Names shown in the documentation are a subset of the settings in the Edit Teacher window. Are these Names the only settings that may be controlled by Script?
Yes.
MrCreosote wrote:3) Are any Extended Teacher Properties controllable by Script?
No, currently they are not. The best approach here is to use pre-defined teachers and activate them by name in the script.

Regards
Thomas Jetter

MrCreosote
Posts: 55
Joined: Wed 21. Jul 2010, 18:43

Re: Teachers and TeacherSetting Command

Post by MrCreosote » Thu 4. Nov 2010, 20:14

MrCreosote wrote:1) First, from the documentation, what are "the three versions of this function." (NOTE: also since this returns a "void" should it be called a Command?)
Admin wrote:Depending on the type of teacher setting the function takes different parameter types. You can think of the function being able to be called with different data types depending on the parameter you want to influence.
I guess I'm not getting the "three version" bit. I looked at all the teachers and they all basically had the same Edit Window parameters that are shown in the documentation. The Extended Properties is another matter - they are very different and not supported with script.

So what are the three version? There is nothing in the documentation which suggests what the 3 types are or what type is actually shown in the documentation.

Thanks,
Tom

User avatar
Admin
Site Admin
Posts: 438
Joined: Sun 16. Nov 2008, 18:21

Re: Teachers and TeacherSetting Command

Post by Admin » Thu 4. Nov 2010, 22:48

MrCreosote wrote:I guess I'm not getting the "three version" bit. I looked at all the teachers and they all basically had the same Edit Window parameters that are shown in the documentation.
It's not about the different teachers, it's about the different parameters that can be adjusted.
For instance the parameter type 'LEARNRATE' needs to be equipped with a double type value while the parameter type 'LESSON_REPS' must be assigned a uint data.

You don't have to worry too much about the mentioned three function alternatives, the compiler will select the correct one for you depending on the data type you hand over to the called function.

In programming language terminology this is called 'function overloading', i.e. a function can exist with different parameter types and numbers although it has the same function name as another version of the function. The compiler will select the most appropriate version of the function depending on the data type which is handed over.

Regards,
Thomas
Thomas Jetter

Post Reply