Help - Search - Members - Calendar
Full Version: how to "Face(X)" the PC
The Black Wyrm's Lair - Forums > Mod development resources & discussion > Modder's Workshop
jastey
Hi,
I have the following problem: If an NPC initiates dialogue with the PC, she will turn to him after the talk is finished. If I start a cutscene out of this dialogue, where the NPC cures her wounds for example while saying some nice things, he is doing this while she is turning her back on him - if he approached from the wrong side for the talk.
For coding I neither know in which area this talk appears nor where NPC and PC are facing at that moment.

Question: Is it possible to do "MoveToPoint" and "Face" in a way relative to the PC's position? If yes, how would it be coded?

Does anyone have another idea as to how this problem could be solved?

(It really looks stupid if the NPC is talking to the PC's back...)

Thanks!
Rabain
If you are doing a cutscene you can have people approach from whichever direction you want!

So the person starting the dialog approaches from the North and the person listening Faces North...problem solved!

MovetoPoint(whatever) Face (Whatever)...person being spoken too Face(whatever direction speaker is facing oppposite)!
jastey
But if I do not know where the persons are standing when the cutscene starts? Maybe the person approaching comes from South... Which I do not know? And I can't give coordinates either, as I do not know in which area it will take place?

Maybe I did not understand what you where saying?
devSin
FaceObject(O:Object)
jastey
Sometimes the answer is so simple! Thank you, devSin, cutscene looks great now. happy.gif
Rabain
Apart from FaceObject (which is a lot better than just Face) my point was that if you have a character in a cutscene there is never a stage when you have no control. As the author of the cutscene you can create characters wherever you wish and have them movetopoint, face etc any place or direction you wish.

In what circumstance would you not know from which direction someone would come? Unless you were using CreateCreatureOffscreen (or whatever the correct format of this command is). However you would still be able to control where this creature moves to and which way they face, no?

Anyway, yes FaceObject() is so much better. smile.gif
jastey
In this case it was a cutscene between the PC and an already in party NPC, so I do not have control as to where I could spawn them etc.

FaceObject is perfect in that case. smile.gif
jastey
QUOTE(jastey @ May 21 2005, 01:50 PM) *
FaceObject is perfect in that case. smile.gif
Unfortunately, it doesn't exist in vanilla BG1, though. I would have had a use for it there now. sad.gif
devSin
If you don't know where the PC is going to be, you could always do something stupid like have your NPC ReallyForceSpell(Player1,FAKE_SPELL_DOES_NOTHING) Wait(1) StartDialog("DLG",Player1). Spellcasting should have the character zip around to face the target (you have to create the fake spell, though). (There are probably other actions that cause the actor to face the target without causing stupid feedback, but I can't come up with any off hand and don't want to look at BG IDS files right now, sorry.)
jastey
That's a good idea, thank you! If you happen to see something that leads to a facing of the "target" without a visible action I would be grateful if you'd let me know. (I also take numbers. tongue.gif)
kulyok
FaceObject would be the solution, but another one is the solution we implement in RE:

CODE
ActionOverride("ppsaem3",MoveBetweenAreas("ARRE01",[472.307],3))
LeaveAreaLUAPanic("ARRE01","",[440.323],10)
LeaveAreaLUA("ARRE01","",[440.323],10)
...
Wait(1)


This way, Saemon and PC turn to each other(3 and 10), and Wait(1) before the start of the dialogue ensures they do.
jastey
If you can transfer, or even spawn the NPCs, then this is an option, yes. It wasn't for me in this case, though.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2024 Invision Power Services, Inc.