SetAngle

Post » Sat May 28, 2011 8:15 am

I am trying to use this code snippet

set angle to Ref.GetAngle Z + Ref.GetHeadingAngle Player
Ref.SetAngle Z angle

But it isn't making the actor face me as it should, anyone know why?
User avatar
BRAD MONTGOMERY
 
Posts: 3354
Joined: Mon Nov 19, 2007 10:43 pm

Post » Sat May 28, 2011 8:27 am

If GetHeadingAngle returns the angle from them to the player, could you just do this:

Set angle to Ref.GetHeadingAngle PlayerRef.SetAngle Z angle


That would make them face directly towards the player, right?
User avatar
Lakyn Ellery
 
Posts: 3447
Joined: Sat Jan 27, 2007 1:02 pm

Post » Sat May 28, 2011 2:05 pm

Lemme try it, the CS wiki said different. Worth a shot, thanks.
User avatar
Meghan Terry
 
Posts: 3414
Joined: Sun Aug 12, 2007 11:53 am

Post » Sat May 28, 2011 5:23 am

Nah still no go, c'est la vie, I made do.
User avatar
Eric Hayes
 
Posts: 3392
Joined: Mon Oct 29, 2007 1:57 am

Post » Sat May 28, 2011 12:49 pm

Right. I just read the wiki page and I was horribly off track. :P According to it, what you have should work. When you say you made do, do you mean you found another way to do it? Otherwise: where is the NPC facing instead of toward the player?
User avatar
Miss K
 
Posts: 3458
Joined: Sat Jan 20, 2007 2:33 pm

Post » Sat May 28, 2011 8:04 am

I am trying to use this code snippet

set angle to Ref.GetAngle Z + Ref.GetHeadingAngle Player
Ref.SetAngle Z angle

But it isn't making the actor face me as it should, anyone know why?


That's how I did it:
set fBrisaAngle to RHKBrisaREF.GetAngle Z + RHKBrisaREF.GetHeadingAngle PlayerRHKBrisaREF.SetAngle Z fBrisaAngle


Are you making sure Ref is non zero?
User avatar
Jessica Colville
 
Posts: 3349
Joined: Wed Oct 18, 2006 6:53 pm

Post » Sat May 28, 2011 11:17 am

I think that was it, I was calling it in a section that might have had the ref unset, not sure, it seems to be working much better, wish I could be more telling on what it is I'm doing, pretty damn excited for release and don't want to spoil anything. One last piece and it might be a damn near perfect realization.
User avatar
No Name
 
Posts: 3456
Joined: Mon Dec 03, 2007 2:30 am


Return to Fallout: New Vegas