The Black Wyrm Lair Forums
The Black Wyrm's Lair Terms of Use Help Search Members Calendar

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> how to "Face(X)" the PC, if I do not know where he should look at
jastey
post May 21 2005, 12:08 AM
Post #1





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




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!
Go to the top of the page
 
Quote Post
Rabain
post May 21 2005, 12:17 AM
Post #2


GOD


Retired team member
Posts: 1728
Joined: 14-July 04
From: Ireland




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)!
Go to the top of the page
 
Quote Post
jastey
post May 21 2005, 12:43 AM
Post #3





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




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?
Go to the top of the page
 
Quote Post
devSin
post May 21 2005, 03:52 AM
Post #4





Forum Member
Posts: 53
Joined: 22-March 05




FaceObject(O:Object)
Go to the top of the page
 
Quote Post
jastey
post May 21 2005, 08:07 AM
Post #5





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




Sometimes the answer is so simple! Thank you, devSin, cutscene looks great now. happy.gif
Go to the top of the page
 
Quote Post
Rabain
post May 21 2005, 12:34 PM
Post #6


GOD


Retired team member
Posts: 1728
Joined: 14-July 04
From: Ireland




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
Go to the top of the page
 
Quote Post
jastey
post May 21 2005, 12:50 PM
Post #7





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




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
Go to the top of the page
 
Quote Post
jastey
post Feb 27 2008, 08:33 PM
Post #8





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




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
Go to the top of the page
 
Quote Post
devSin
post Feb 27 2008, 10:48 PM
Post #9





Forum Member
Posts: 53
Joined: 22-March 05




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.)
Go to the top of the page
 
Quote Post
jastey
post Feb 28 2008, 07:10 AM
Post #10





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




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)
Go to the top of the page
 
Quote Post
kulyok
post Feb 28 2008, 07:28 AM
Post #11





Forum Member
Posts: 112
Joined: 8-September 05
From: Moscow, Russia




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.


--------------------
Go to the top of the page
 
Quote Post
jastey
post Feb 28 2008, 05:53 PM
Post #12





Forum Member
Posts: 1366
Joined: 22-August 04
From: Germany




If you can transfer, or even spawn the NPCs, then this is an option, yes. It wasn't for me in this case, though.
Go to the top of the page
 
Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:



- Lo-Fi Version Time is now: 18th May 2024 - 11:47 PM