Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: mortennajbjerg on December 06, 2013, 02:43:14 PM

Title: Talking to actors who are off the stage
Post by: mortennajbjerg on December 06, 2013, 02:43:14 PM
Hi Wintermute forum

I've probably just overlooked a setting on the Actor Object - but how do my protagonist make conversations with actors who are not present on the screen - e.g. when talking on the phone.
How is this done?
Title: Re: Talking to actors who are off the stage
Post by: hubertMichael on December 06, 2013, 09:28:53 PM
Hi

Just make an entity by script. This is from my game:

Code: [Select]
var bear = Scene.CreateEntity("bear"); //name of entity
bear.Caption = "Bear"; //caption name
bear.WalkToX = 1000;  //this is position of place where your actor should go after you click your entity
bear.WalkToY = 380;
bear.WalkToDirection = 6; //direction of your actor when it's near entity
bear.Interactive = true;
bear.SubtitlesPosRelative = false;
bear.SubtitlesPosX = 750; //position of subtitles for your entity
bear.SubtitlesPosY = 100;

bear.SetFont("fonts\Sansation_RegularTalkEnt.font"); //this is my font. Your font has different path
bear.AttachScript("scenes\nightmares\dialogues\bear\bearTalk.script"); //this is the standard dialogue script

var region = bear.CreateRegion(); // you need to build active mouse region for your entity

region.AddPoint(430, 210); //top left corner
region.AddPoint(915, 210); //top right corner
region.AddPoint(915, 630);  //bottom right corner
region.AddPoint(430, 630); // bottom left cornrt


Hope I helped :)
Title: Re: Talking to actors who are off the stage
Post by: piere on December 06, 2013, 11:53:24 PM
You can just set your actor's x and y value to something way off screen. Something like actor.SkipTo(-1000,-1000);  that way the player cannot ever go to him or see him, but he will be still in the scene.
Title: Re: Talking to actors who are off the stage
Post by: mortennajbjerg on December 07, 2013, 12:38:09 PM
Hi HubertMichael and piagent

Both answer where really helpful. Thank you hubert for posting the script - this was something I needed to solve another problem I was struggling with as well ;)
I'll try it out and see what I can come up with.

/Morten