PDA

View Full Version : PC o party members facing


GeorgNihilus
08-06-2007, 04:11 PM
Well people :) ... now I'm trying to determine where is the PC or a party member facing to, I wonder if there's a function to check the SetFacing() function value for the PC for example, or maybe the SetFacingPoint(Vector()) one ...

what I want to do is align the PC and a party member to look to the same direction -or the direction I want- without having to set them into a determined position ... are there such functions? or procedures? :giveup:

thanks as usual ... :thumbsup:

stoffe
08-06-2007, 04:16 PM
what I want to do is align the PC and a party member to look to the same direction -or the direction I want- without having to set them into a determined position ... are there such functions? or procedures? :giveup:


I'm not sure I understand what you need to do. If you want to make two characters face in the same direction wouldn't it work to just use SetFacing() with the same angle specified for both of them?

Alexander the Great
08-06-2007, 04:31 PM
I think he means just the head, in which case I'm pretty sure is possible. I have no idea how, though.

GeorgNihilus
08-06-2007, 04:33 PM
Suppose I want to this dialog:

1) PC: -Hey Juhani, have you seen those Czerka thugs there?-
2) Juhani: -What? Where?-
3) PC: -Behind you, take a look ...-
4) Juhani: -Ah Ok I will take a look (she turns 180 degrees to look to her back i.e.)-
5) PC: -so, are you ready to pass through them?-
6) Juhani: -OK, let's do it ...-

AND I set camera 8 with camera angle 2 in the DLGEditor to see this scene as an animation -associated to a script of course- ... before retaking the dialog in line 5 ... in line 4 the PC 'should' be looking to the same direction of Juhani if possible ...

hope it helps ... :)

tk102
08-06-2007, 04:41 PM
You might also try setting the Listener field to be the Tag of one of the thugs so in essence Juhani would be speaking to the thug in 4).

stoffe
08-06-2007, 04:43 PM
1) PC: -Hey Juhani, have you seen those Czerka thugs there?-
3) PC: -Behind you, take a look ...-
4) Juhani: -Ah Ok I will take a look (she turns 180 degrees to look to her back i.e.)-

Well, if said Czerka Thug actually would be behind her, as indicated by the dialog, wouldn't it just be enough to make both Juhani and the PC face aforementioned thug? Like...

void main() {
vector vFace = GetPosition(GetObjectByTag("CzerkaThug"));
AssignCommand(GetObjectByTag("Juhani"), SetFacingPoint(vFace));
AssignCommand(GetFirstPC(), SetFacingPoint(vFace));
}

...or am I still misunderstanding things? Sounds logical at least that if a character is requested to look at someone they'd look in their direction?

GeorgNihilus
08-06-2007, 07:12 PM
Alright guys I've not been sincere with you :roleyess: ... -I hope I'm not gonna be banned for this mmm...- I want a sexy mod with Juhani placed in front of me to dance to a male PC as required in a dialog; first she dances a little facing the PC and then she should turn to give him her back... (180) and dance to him that way for nn seconds before retaking the dialog ...

So the PC should be looking at her during the whole 'animated' scene ... which is gonna be triggered by a script ... BUT I want this to be triggered if possible in many planets not only in a specific spot (place); that's why I thought in that orientation stuff...

so that's it hope it helps ... :waive1:

stoffe
08-06-2007, 07:47 PM
Juhani placed in front of me to dance to a male PC as required in a dialog; first she dances a little facing the PC and then she should turn to give him her back... (180) and dance to him that way for nn seconds before retaking the dialog ...

Well, the easiest way I can think of would simply be to make the spectator look at the dancer and then make the dancer look the same way as the spectator when she should turn around. For example:

void main() {
object oDancer = GetObjectByTag("Juhani");
object oDancee = GetFirstPC();

// Step 1) Make them face each other
AssignCommand(oDancee, SetFacingPoint(GetPosition(oDancer)));
AssignCommand(oDancer, SetFacingPoint(GetPosition(oDancee)));

// Step 2) Make Dancer look the other way 10 seconds later
DelayCommand(10.0, AssignCommand(oDancee, SetFacingPoint(GetPosition(oDancer))));
DelayCommand(10.5,AssignCommand(oDancer, SetFacing(GetFacing(oDancee))));
}

GeorgNihilus
08-07-2007, 07:41 PM
Great. That was the kind of function I was looking for: GetPosition(), SetFacingPoint() and so ... thanks a lot Stoffe :worship:

Very helpful as usual ... :thmbup1: