Page 1 of 1

Teachers and TeacherSetting Command

Posted: Tue 2. Nov 2010, 20:28
by MrCreosote
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

Re: Teachers and TeacherSetting Command

Posted: Wed 3. Nov 2010, 22:30
by Admin
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

Re: Teachers and TeacherSetting Command

Posted: Thu 4. Nov 2010, 20:14
by MrCreosote
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

Re: Teachers and TeacherSetting Command

Posted: Thu 4. Nov 2010, 22:48
by Admin
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