getcrosshairref

Post » Mon Jun 28, 2010 6:26 pm

Can someone please give me an example script of how I would use this on, say, a tree?

I know i need to give the tree a reference name and make it a persistent reference, but how would I use getcrosshairref to see if the player activated it?
User avatar
Nice one
 
Posts: 3473
Joined: Thu Jun 21, 2007 5:30 am

Post » Tue Jun 29, 2010 2:49 am

You don't have to activate the object. It's enough that the crosshair is over it within the activation distance.
ref rTreeREFset rTreeREF to GetCrossHariREF

User avatar
Nymph
 
Posts: 3487
Joined: Thu Sep 21, 2006 1:17 pm

Post » Mon Jun 28, 2010 7:02 pm

You don't have to activate the object. It's enough that the crosshair is over it within the activation distance.
ref rTreeREFset rTreeREF to GetCrossHariREF



Thanks, but then what would I put if I wanted to give the player ten caps when he activates it?
User avatar
Nick Swan
 
Posts: 3511
Joined: Sat Dec 01, 2007 1:34 pm

Post » Mon Jun 28, 2010 11:15 am

Why not put a script with an OnActivate block on the tree?
Otherwise, you'd have to keep looking at GetCrossHairRef until it was your tree's specific reference, then use IsControlPressed to check when the player pressed use.
User avatar
Bedford White
 
Posts: 3307
Joined: Tue Jun 12, 2007 2:09 am


Return to Fallout: New Vegas