Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: script problem  (Read 3862 times)

0 Members and 1 Guest are viewing this topic.

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
script problem
« 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");
}




Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: script problem
« Reply #1 on: February 08, 2005, 08:55:47 AM »

And the problem is...?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
Re: script problem
« Reply #2 on: February 08, 2005, 01:32:27 PM »

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.
Logged

blmw911

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 7
    • View Profile
Re: script problem
« Reply #3 on: February 08, 2005, 01:48:04 PM »

Where is line 16 in your script?


And did you tried

this.Talk("Hola");

instead of

vago.Talk("Hola");
Logged

tinchopunk

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Gender: Male
  • Posts: 90
    • View Profile
    • martinarregui.tumblr.com
Re: script problem
« Reply #4 on: February 09, 2005, 04:32:12 AM »

ok thanks that work for that
 MArtin
Logged
 

Page created in 0.033 seconds with 24 queries.