Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: tinchopunk on February 08, 2005, 01:27:34 AM
-
I want to talk between actors
I have my actor and another 3dactor called vago you can not use that
the script:
#include "scripts\base.inc"
global Statecallejon;
global vago;
////////////////////////////////////////////////////////////////////////////////
on "Talk"
{
Game.Interactive = false;
if(!Statecallejon.TalkedTovago) actor.Talk("Hola alienigena");
else actor.Talk("Soy yo otra ves");
vago.Talk("Hola");
Statecallejon.TalkedTovago = true;
vagoDialogue();
Game.Interactive = true;
}
////////////////////////////////////////////////////////////////////////////////
function vagoDialogue()
{
var Responses;
var Selected;
var Loop = true;
while(Loop)
{
Responses[0] = "¿Qué sos?";
Responses[3] = "Es una perdida de tiempo hablar con un alienigena";
Game.AddResponse(0, Responses[0]);
Game.AddResponse(3, Responses[3]);
// let the player choose one
Selected = Game.GetResponse();
actor.Talk(Responses[Selected]);
if(Selected==0)
{
vago.Talk("Soy un Kiwutziano");
actor.Talk("Ah si mi primo es Kiwutziano...");
vago.Talk("No creo que sea del mismo lugar que yo");
}
else
{
vago.Talk("Lo mismo digo");
Loop = false; // we want to end the dialogue
}
}
}
////////////////////////////////////////////////////////////////////////////////
on "LookAt"
{
actor.Talk("Parece ser un alienigena amistoso");
}
////////////////////////////////////////////////////////////////////////////////
on "Take"
{
actor.Talk("Creo que un conflicto intergaláctico no es la solución para tantos problemas");
}
-
And the problem is...?
-
the rpoblem is that vago make an error script when it talk
something like that
22:43: Runtime error. Script 'actors\vago\vago.script', line 16
22:43: Call to undefined method 'Talk'. Ignored.
-
Where is line 16 in your script?
And did you tried
this.Talk("Hola");
instead of
vago.Talk("Hola");
-
ok thanks that work for that
MArtin