troubles with variables solved

Started by viktor, Fri 02/07/2004 15:20:45

Previous topic - Next topic

viktor

I have a character. When you talk to him a dialog runs thrugh. So far so good. But After that dialog the player is supose to for instance log on to the internet and send an e-mail (in the game ofcourse).  Then when the player would talk to the character agin there would be a diferen't dialog.
Let's just say that the player has to turn on the computer (and the e-mail would be sent automaticaly) so that thing won't get to complicated.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Ashen

If you just want to change a few lines, use SetDialog option, in the computer's interaction, e.g.

  SetDialogOption (1, 2, 0); // Turns off 'OK, Ill e-mail it' response in dialog 1
  SetDialogOption (1, 3, 1); //Turns on 'I sent you an e-mail' response in dialog 1
  DisplaySpeech (EGO, "OK, I sent the E-Mail);

If you want to change a lot of the dialog, it'd probably be easier to use a different dialog, e.g.:

Talk To Character:
Run Script:
  if (GetGlobalInt (2) != 1) {
  RunDialog (1);
  }
  if (GetGlobalInt (2) == 1) {
    RunDialog (2);
  }


Computer Interaction:
Run Script
  if (GetGlobalInt (2) != 1) {
    DisplaySpeech (EGO, "OK, I sent the E-Mail);
    SetGlobalInt (2, 1);
  }
  if (GetGlobalInt (2) == 1) {
    DisplaySpeech (EGO, "Nah, I already sent it.");
  }
I know what you're thinking ... Don't think that.

viktor

thanks. I'm going to try that. But is there any other way than scripting?
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Ashen

You could use the Interaction editors variables, instead of GlobalInts
So:

Make a Global variable called dialog

Talk to Character:
Conditional - If variable is set to a certain value (dialog, 0)
      Game - Run dialog (1)
      Stop running more commands
Game - Run dialog (2)


Computer Interaction:
Game - Set variable value (dialog, 1)
// And Game - Display message if you want it to say 'Message sent'
I know what you're thinking ... Don't think that.

viktor

ok now this has become complicated.
Ok this is acualy what I want to do. 

The player acualy has a phone (i said computer becouse i didn't want to spoil the game).

The player talks to a character. Befor he talks to the character he is not able to use the phone. After he talks to the character he can use the phone. After he uses the phone he talks to the character again. A diferent dialog runs. After that he uses the phone again. Another diferent dialog runs. After that dialog runs he talks to the character again and a nother dialog runs then the character is transported to another room.

This is a bit complicated. But I hope someone can help me.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

Ashen

So, what's so complicated? Just use more 'Conditional - If variable is set to' commands.

Make a global variable called phone

Phone interaction:
Conditional - If variable is set to a certain value (phone, 0)
  Game - Display message (Make a message that says something like "I wouldn't know who to call")
Conditional - If variable is set to a certain value (phone, 1)
     Game - Run dialog (2)
     Game - Set variable value (phone, 2)
Conditional - If variable is set to a certain value (phone, 3)
     Game - Run dialog (4)
     Game - Set variable value (phone, 4)

Talk to character:
Conditional - If variable is set to a certain value (phone, 0)
     Game - Run dialog (1)
     Game - Set variable value (phone, 1
Conditional - If variable is set to a certain value (phone, 2)
     Game - Run dialog (3)
     Game - Set variable value (phone, 3)
Conditional - If variable is set to a certain value (phone, 4)
     Game - Run dialog (5)
     Player - Go to another room


Dialog 1 = First time talk to character
Dialog 2 = First phone call
Dialog 3 = Second time talk to character
Dialog 4 = Second phone call
Dialog 3 = Third time talk to character
I know what you're thinking ... Don't think that.

viktor

thanks for the help.  You saved the game becouse I was geting realy frustrated with this. I'm not so bright when it somes to things like this  :P.
signature" border="0
<a target='_blank' href='https://imgbb.com/'>resurrection pictures for facebook</a>

SMF spam blocked by CleanTalk