Player turns his head towards what's interesting

Post » Sun Aug 26, 2012 4:24 am

Is it possible to make the player character turn his head to actually look at who's talking or whoever is passing you in town. Even looking at things that might just be interesting. You know, make the player feel more alive and acknowledging his surroundings. Even if you're just out walking in the woods it would be fun if he actually turns his head around and just looks at where he is.

You can see the NPC atleast turn their head towards people talking even if they're moving about, so it seems to be like a command, [look at] no matter where they are.

I guess not many are interested in stuff like this except the roleplayers, but still, doesn't hurt to ask
User avatar
LijLuva
 
Posts: 3347
Joined: Wed Sep 20, 2006 1:59 am

Post » Sun Aug 26, 2012 4:43 pm

http://www.creationkit.com/SetLookAt_-_Actor I'd have to test to see if it even worked on the player. And assuming it did, it would have to be clearly defined what is "interesting".
User avatar
noa zarfati
 
Posts: 3410
Joined: Sun Apr 15, 2007 5:54 am

Post » Sun Aug 26, 2012 2:35 am

Awesome, well I guess primarily it would be to turn his head at people who is talking, that would be the most effective way to add immersion. And I guess later on, if it works, one can add to randomly look at some direction briefly, you know, looking around. But looking at the people who is talking would be the most important thing. I hope ti works!
User avatar
Sherry Speakman
 
Posts: 3487
Joined: Fri Oct 20, 2006 1:00 pm

Post » Sun Aug 26, 2012 1:49 pm

Sorry, no dice.

So I threw this together (please excuse the crappy, not well-thought code):

Spoiler
scriptname _TEST_PlayerLooksAtStuff extends Questimport debugActor property PlayerRef autoActor CurrentLookTargetActor LastLookTargetEvent OnInit()	RegisterForSingleUpdate(1)endEventEvent OnUpdate()	Actor myTarget	if !CurrentLookTarget		notification("No current target.")		myTarget = LookForNewTarget()	endif		CurrentLookTarget = myTarget		if CurrentLookTarget		PlayerRef.SetLookAt(CurrentLookTarget)	else		RegisterForSingleUpdate(1)	endif	endEventActor function LookForNewTarget()	Actor myTarget		notification("Searching...")	;Make player find some actor within 400 game units	int i = 0	while i < 10	;Ten tries to find something that isn't the player		myTarget = Game.FindRandomActorFromRef(PlayerRef, 400.0)		if myTarget != PlayerRef			notification("Found target.")			messagebox("Target = " + myTarget)			return myTarget		else			i += 1		endif	endWhile		return none	endFunction

This is supposed to make the player fix his view on a random actor within 400 game units that isn't himself. I get all of the expected notifications, but the player never fixes his view on the other actor. My guess is that the Player would have to be AI driven for this to function (and that's not feasible since, well, you no longer control the Player).

Oh well, was worth a shot. Maybe there's another way.
User avatar
Pixie
 
Posts: 3430
Joined: Sat Oct 07, 2006 4:50 am

Post » Sun Aug 26, 2012 10:43 am

Well that's something atlest! I don't know how things work, I'm no modder, but is there no way to sort of reverse engineer it; What I mean is, when an AI talks to you, they have you as their target so they look at you, is there any function that lets you know who has you as a target?

EDIT: Ah, I see what you mean. you got the targets, but the player never turn his head anyway?
User avatar
Kat Stewart
 
Posts: 3355
Joined: Sun Feb 04, 2007 12:30 am


Return to V - Skyrim