Moving NPC to exact coordinates in a different room

Started by KingBagel, Fri 02/07/2004 05:57:07

Previous topic - Next topic

KingBagel

I feel really awkward for needing help on something that, I have a feeling, is so very simple, but I've been scouring the forum for an hour trying to find somebody else with my problem. Checked the BFAQ, Beginner's forum, Knowledge Base, a few tutorials and the manual, but I can't find it anywhere. Please, excuse me if I'm being a pest or if this is an insanely easy question.

Here's the setup. The player character and his wife are in the kitchen talking. His wife leaves the room to the living room, and when the player character enters the living room, his wife is sitting on the couch. However, getting her TO the couch is causing me rapid hair loss. Here's my problem: I'm utterly and unavoidably stuck on how to move her to an exact location after she leaves the room. I used the Interaction Editor to get her into the other room, but when the player character enters the living room, she's simply at the same coordinates as the door she left through in the previous room. I can't seem to find any way whatsoever of making her leave the room, and then sauntering over to the couch off-screen.

Again, I'm deeply sorry if this is right under my nose somewhere, but I'm burned out after working on Sandwich Quest for so long tonight. Any help anybody can offer is greatly appreciated. Thanks a ton, and happy travels.
"Does it involve wanton destruction?" "We can only hope."

Gilbert

Use scripting to position the character, example:

character[BLAH].x = 150;
character[BLAH].y = 80;

Barbarian

Not sure I completely follow what you're trying to do, but wouldn't something like the MoveCharacter command do what you want?Ã,  Example from the manual:

MoveCharacter(EGO,155,122);

will make the character, EGO,Ã,  walk to 155,122

Ã,  Ã, If that's not what you need, and you want her to appear already at the couch when your character enters the rooms, you could have apon when she leaves the previous room , then add script commands such as the following example:

character[GIRL].room = 16;
character[GIRL].x = 168;
character[GIRL].y = 130;



Ã,  Ã, So, this would set the character by the name of "GIRL" in room 16, at x co-ordinates of 168, and y co-ordinates of 130. This would be done before your main character enters the room, then he would see "GIRL" already sitting at the couch like you want. You could also set up the script to run as part of the "Before fadein" options.

*Edit: Looks like Gilbert was already writing a reply to you at the same time I was writing mine.  ;D And he beat me to it.
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

KingBagel

Say, thanks for the quick replies. You both answered my question -- character[scriptname].x/y solved the problem. Barbarian -- MoveCharacter wasn't working because she was already out of the room. All I needed was for her to be positioned somewhere in the next room after leaving the first room, and that did the trick. Problem solved, and again, you've got my gratitude, both of you. ;D
"Does it involve wanton destruction?" "We can only hope."

SMF spam blocked by CleanTalk