PDA

View Full Version : Current target actor


HAL9000
20th Jan 2004, 04:29 PM
Hi!
I was wondering if there is an easy way to get a reference to the actor that is currently being targeted by the player. I want to write a function that enables the user to interact with an actor by moving the crosshair over it and pressing a button. Does anybody know how that works?

Vito
24th Jan 2004, 08:27 AM
You can do traces from the center of the crosshairs, say, once per tick, or set up a lineofsight trigger if you only have specific things you want to interact with.

HAL9000
10th Feb 2004, 06:19 PM
Ok, it took me a while to find the Actor.Trace function and figure out how to use it but it works fine now. Thanks a lot for your help.