I have a problem with one actor. The subtitles of this actor aren't shown at the bottom of the screen. Usually there are two actors in the scene and for the first actor it works fine. Additionally I tried to load an additional actor to the scene and let him talk. Works fine, too. Because of that, I guess something is wrong with my actor. But the settings are the same.
Here the upper part of actor files:
ACTOR
{
NAME = "Mann"
CAPTION=""
SCALABLE = TRUE
INTERACTIVE = FALSE
X = 400
Y = 460
SCRIPT="actors\Mann\Mann.script"
FONT = "fonts\verdana_red.font"
...
}
NAME = "Frau"
CAPTION="Frau"
SCALABLE = TRUE
INTERACTIVE = TRUE
X = 600
Y = 660
SCRIPT="actors\Frau\Frau.script"
FONT = "fonts\verdana_red.font"
...
}
I overrode the talk methode that a picture appears and behind the text appears a black box/picture.
Here the code of "Frau" script:
method initFrau(Frau)
{
Frau.SubtitlesPosRelative = false;
Frau.SubtitlesPosXCenter = true;
Frau.SubtitlesPosX = 512;
Frau.SubtitlesPosY = 720;
Frau.SubtitlesWidth = Game.ScreenWidth - 40;
}
method TalkAnimation(Text, EntityPfad)
{
Game.Interactive = false;
//initFrau(this);
var vordergrundLayer = Scene.GetLayer("Vordergrund");
vordergrundLayer.AddEntity("faceEntity");
vordergrundLayer.AddEntity("sprechBox");
var entityObject = vordergrundLayer.GetNode("faceEntity");
var entitySprechbox = vordergrundLayer.GetNode("sprechBox");
entitySprechbox.SetSprite("\sprites\system\sprechBox.sprite");
entitySprechbox.Interactive = false;
entitySprechbox.X = 0;
entitySprechbox.Y = 706;
entitySprechbox.active = true;
entityObject.SetSprite(EntityPfad);
entityObject.Interactive = false;
entityObject.X = 876;
entityObject.Y = 706;
entityObject.Active = true;
this.Talk(Text);
vordergrundLayer.DeleteNode(entityObject);
vordergrundLayer.DeleteNode(entitySprechbox);
Game.Interactive = true;
}
The scene init script:
if(!StateTerasse_Ballon.Visited)
{
StateTerasse_Ballon.Visited = true;
var Tuer = Scene.GetNode("Tuer");
Tuer.SetSprite("scenes\Terasse_Ballon\Tuer_oeffnen.sprite");
Sleep(2000);
Tuer.SetSprite("scenes\Terasse_Ballon\Tuer_offen.sprite");
//var FrauActor = Scene.LoadActor("actors\Frau\Frau.actor");
var FrauActor = secondActor;
FrauActor.Active = true;
FrauActor.SkipTo(300, 520);
FrauActor.GoTo(450, 520);
var ServiceActor = Scene.LoadActor("actors\Frau\Frau.actor");
ServiceActor.Active = true;
ServiceActor.SkipTo(400, 520);
ServiceActor.Talk("Hallo Wie gehts.");
FrauActor.Talk("Was geht den jetzt ab, wo ist mein Text? Den suche ich und finde Ihn nicht!");
actor.SkipTo(300, 520);
actor.GoTo(500, 520);
actor.TalkAnimation("Sie sind uns Dicht auf den Versen.", "sprites\faces\normal.sprite");
actor.TalkAnimation("Wo geht es weiter?", "sprites\faces\normal.sprite");
FrauActor.TalkAnimation("Wir müssen die Tür blockieren, ich halte Sie zu, suchen Sie was zum Verriegeln. ", "sprites\faces\Frau_normal.sprite");
//Tuer.Visible = false;
var LayerMain = Scene.GetLayer("main");
LayerMain.DeleteNode(Tuer);
//Tuer.SetSprite("scenes\Terasse_Ballon\Tuer_geschlossen.sprite");
//Scene.DeleteEntity(Tuer);
var Tuer2 = Scene.GetNode("Tuer2");
Tuer2.SetSprite("scenes\Terasse_Ballon\Tuer_schliessen.sprite");
Sleep(2000);
LayerMain.DeleteNode(Tuer2);
//Tuer2.SetSprite("scenes\Terasse_Ballon\Tuer_geschlossen.sprite");
Scene.FadeOut();
//Scene.DeleteEntity(Tuer2);
FrauActor.Active = false;
Scene.UnloadObject(FrauActor);
var BlockierendeFrau = Scene.GetNode("Frau");
BlockierendeFrau.SetSprite("scenes\Terasse_Ballon\Frau_blockieren.sprite");
Scene.FadeIn();
// this is our first visit in this scene...
}
What is all necessary for showing text of an actor and is not depending on all actors?
Perheps someone find a failure in my code.
Thanks