Get Angle of Sight of the Player

Post » Tue Jun 19, 2012 3:07 pm

Hi.

In the long way to learn CK and scripting, I'm trying to do some projectiles, and I'm now blocked by a lack of knowledge.

I have a sword, and I would like to add it a projectile when it is wielded, like in Zelda with full life, for example. By Papyrus Scripting, because I guess I can't do it without it. And the "object" fired by the sword is a physical object, not an effect.

What are the Papyrus command to get the XYZ angle of sight of the player, in order to apply the projectile the same direction ?
I would then apply a ApplyHavokImpluse, I guess. If not, please light my mind, I want to learn.

I hope I'm clear enough.

Thanks.

EDIT :

I have another question, bind to the other :
If I want my projectile to stay in the target body, like the Ice spell does, how the hell can I do that ?? I found absolutly nothing about it.
User avatar
Johanna Van Drunick
 
Posts: 3437
Joined: Tue Jun 20, 2006 11:40 am

Post » Tue Jun 19, 2012 1:58 pm

Nobody ? ;/
User avatar
helen buchan
 
Posts: 3464
Joined: Wed Sep 13, 2006 7:17 am

Post » Tue Jun 19, 2012 9:35 am

int LookingX = Game.GetPlayer().GetAngleX()
int LookingY = Game.GetPlayer().GetAngleY()
int LookingZ = Game.GetPlayer().GetAngleZ()
http://www.creationkit.com/GetAngleX_-_ObjectReference


I think that should do it :)
User avatar
Motionsharp
 
Posts: 3437
Joined: Sun Aug 06, 2006 1:33 am

Post » Tue Jun 19, 2012 6:23 pm

Thank you much :)
User avatar
Thema
 
Posts: 3461
Joined: Thu Sep 21, 2006 2:36 am


Return to V - Skyrim