Phone calls - dialogs

Started by Thanyx, Sat 16/09/2017 12:26:04

Previous topic - Next topic

Thanyx

Hello

I have this situation about dialogs during phone calls.
Im using Sierra style dialogs.

The problem is that if you want to have a dialog with a character, you need to put them in the room. Obviously, my question is, how to start the dialog without the character in the room?

Example:
I click on the phone in the inventory and it will start new dialog.
Ego: Hi.
Char: Why do you call me?
Ego: Im vegan.
...
I understand I dont need to use same character on the phone as I have in other room and basically create e.g. Character1  and Character_Phone. The question is, how to access this character_phone, basically from any room in the game?


Riaise

I think you have to bring Character_Phone into the same room as the player before starting a conversation. So when the player clicks the phone, do

Code: ags
Character_Phone.ChangeRoom(player.Room)


before starting the dialog. If there's a better way of doing it then I'm sure someone else will let you know soon enough! :)

dayowlron

As far as I know the character does have to be in the room, if you don't want the character to be shown on the screen you can do any of the following:
Code: ags

    character_phone.Transparency=100

or place the character off the screen.
Pro is the opposite of Con                       Kids of today are so much different
This fact can clearly be seen,                  Don't you know?
If progress means to move forward         Just ask them where they are from
Then what does congress mean?             And they tell you where you can go.  --Nipsey Russell

Khris

Quote from: Thanyx on Sat 16/09/2017 12:26:04The question is, how to access this character_phone, basically from any room in the game?
Can you clarify what exactly you mean by this?
Accessing a character that isn't in the room is no different from accessing a character that already is inside the room.

Thanyx

Sorry for my poor explanations.

Long Story short:
My Ego has a phone. And he will need to call one character from all the rooms. Do I need to always set the character to change room or is there any global script that will trigger same dialog with same character but in five different rooms.

Example:

Room Kitchen:
Click on phone - dDialog1.Start()

Room Park:
Click on phone - dDialog1.Start()

Etc.


Khris

You can call standard script commands inside dialog scripts if you indent them by at least one space.
All you need to do is move the character to the current room at the start of the dialog, afaik. Try this:

Code: ags
@S
  cNPC.ChangeRoom(player.Room);
...

SMF spam blocked by CleanTalk