Yes , I see ...
I have written myself a function to let the actor read a number:
function SayNumber(Number)
{
var Zahl;
Zahl[0]="null";
Zahl[1]="eins";
Zahl[2]="zwei";
Zahl[3]="drei";
Zahl[4]="vier";
Zahl[5]="fünf";
Zahl[6]="sechs";
Zahl[7]="sieben";
Zahl[8]="acht";
Zahl[9]="neun";
var GZahl;
GZahl[0]="Null";
GZahl[1]="Eins";
GZahl[2]="Zwei";
GZahl[3]="Drei";
GZahl[4]="Vier";
GZahl[5]="Fünf";
GZahl[6]="Sechs";
GZahl[7]="Sieben";
GZahl[8]="Acht";
GZahl[9]="Neun";
var Number2=new String("1234");
Number2=ToString(Number);
if(Number2.Length>1) {
for(var Pos=0; Pos<Number2.Length-1; Pos=Pos+1) {
if(Pos==0) {
actor.Talk(GZahl[Number2.Substr(Pos,1)]+" ...","ui\looky\zahlen\"+Number2.Substr(Pos,1)+".ogg");
} else {
actor.Talk("... "+Zahl[Number2.Substr(Pos,1)]+" ...","ui\looky\zahlen\"+Number2.Substr(Pos,1)+".ogg");
}
}
}
actor.Talk("... "+Zahl[Number2.Substr(Number2.Length-1,1)]+".","ui\looky\zahlen_ende\"+Number2.Substr(Number2.Length-1,1)+".ogg");
}
I wanted to give the function an integer number as the parameter. I would have changed the code so that my number is stored in a real string object but the number is randomly generated and so I have to use integers instead. Is there no way to let my actor "speak" such a number with the code above?
Thanks
Mac