Get Actor Reference in Players Crosshairs

Post » Thu Sep 12, 2013 1:49 pm

Is it possible to get the reference of the actor the player is looking at?

I was looking at the creation kit wiki but I couldn't see to find what I was looking for.

If this is possible could someone explain to me how you do it?

Thanks

User avatar
Gavin Roberts
 
Posts: 3335
Joined: Fri Jun 08, 2007 8:14 pm

Post » Thu Sep 12, 2013 8:30 am

If you don't mind using SKSE functions, you can use the functions RegisterForCrosshairRef() and OnCrosshairRefChange(ObjectReference ref). If you don't want to use SKSE, GetCombatTarget() will work while in combat, but I'm not sure if there are any other workarounds to find the player's target outside of combat.

User avatar
Hannah Barnard
 
Posts: 3421
Joined: Fri Feb 09, 2007 9:42 am


Return to V - Skyrim