Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - DarkMasterOz

#1
My game features 3 playable characters, who you can control anytime you want and will say different things when interacting with people/objects.

What i'm having trouble with, is having different dialogs for each object, depending on who's in the room with you.

For example:
if BARRY is in the room on his own and looks at a car, he'll say "Nice Car".
But if JOHN is in the room with him, he'll say something else like "Can I drive your car?" and JOHN replies with "No."

Whenever i try to do that, it'll always say the "Nice Car" bit first, regardless if he's on his own or not.
This is the code i have.

function hCar_Look()
{
if (player == cBarry) {
  cBarry.Say("Nice car.");
}
  if (player.Room == cLee.Room)
  if (player == cBarry) {
  cBarry.Say("I like his car?.");
  if (player.Room == cLee.Room) cLee.Say("We should take it for a drive.");
  if (player.Room == cBarry.Room) cBarry.Say("I'll get John's permission first.");
}
if (player.Room == cJohn.Room)
if (player == cBarry) {
  cBarry.Say("Can I drive your car John?.");
  if (player.Room == cJohn.Room) cJohn.Say("No, no you can't.")


I'm not sure if that makes any sense or not, if it doesn't i'll try to explain a bit more clearly when i'm less tired.   :smiley:
#2
Sorry i can't think of how to describe my problem in short for the topic title, I've got 5 characters:
* Character 1: Baz
* Character 2: Brian
* Character 3: Bob
* Character 4: Barry
* Character 5: Billy
and I want to make it so if a character is in a room with any one of the other characters and looks at something like an item or a hotspot, that other character will interact as well. Like this for example:

1) Bob looks at a window and says "It's a window"
2) If Baz is in the room with him, Baz will say "yes you're right"
3) If Brian is in the room with him he'll say "correct, that is a window" etc...
also
if any of the other characters interacts with an object, Bob will join in too.

I know how to make all 5 interact with each other by using this inside a "runscript" for example:

if (player == cBaz) { cBaz.Say("I don't know how to work it."); }
if (player == cBrian) { cBrian.Say("I've tried, it still doesn't work.");
cBob.Say("Well make it work"); }
if (player == cBob) { cBob.Say("If I did that, i'd kill everyone."); }
if (player == cBarry) { cBarry.Say("I am unable to comply."); }
if (player == cBilly) { cBilly.Say("You do it Bob.");
cBob.Say("No");
cBilly.Say("Brian?.");
cBrian.Say("No too.");
cBilly.Say("Barry?.");
cBarry.Say("I can't do that Dave.");
cBilly.Say("Baz?.");
cBaz.Say("Yeh I don't think so.");
cBilly.Say("Don't blame me if you beam into a brick wall covered with poo.");
cBob.Say("We bloody well will bottom gag, now do your stuff.");   }


But that will make them talk even if they arent in the room

If somebody can help me solve this, i've got one more problem which i cant seem to find answer to on forums or manual properly. After that i'm pretty much set.
#3
My game has 5 controllable characters with weird random plots and scenes, but i was wondering if its possible to do a transporter type room where 1 character has to activate a button to transport any characters that are stood on a certain hotspot? I'll break it up to bullet points again to let you know what i want doing if possible ;)
I'll make names up for characters:
Character 1: Bob
Character 2: Barry
Character 3: Ben
Character 4: Barney
Character 5: Brian

* Bob or any of ther other characters stands at a button ready to press to transport the other(s)
* Whoever is stood on the hotspot which will act as the bit they stand on, gets transported to a certain location.

Thats what i want to know how to do if possible, a bonus would be if i could have a GUI pop up when i press the button to show an icon of different places to choose, to send the characters to.
SMF spam blocked by CleanTalk