Change distance of activation

Post » Fri Nov 01, 2013 8:49 am

Hi there!

I noticed that all objects which we can use are activation from a long distance

Is it possible to change distance of activation?

For example:

I wanna activate bed from a short distance or player can pickup any weapons from the short distance

User avatar
X(S.a.R.a.H)X
 
Posts: 3413
Joined: Tue Feb 20, 2007 2:38 pm

Post » Fri Nov 01, 2013 1:07 am

what do you mean, you want to reduce the distance in which they'll get the "activate xyz" prompt in game, do i get that right...?

don't know of any way to directly do this, but you could work around like this:

basically, make the activator a static instead and put an activator primitive around it, mark this as "player activation" on the ref.

this primitive starts disabled, an on it, you'd put a script that checks for player distance and only disables the primitive (= when you get the prompt) when he's within your desired distance (and re-disables when not).

instead of distance checks, you can of course also go with a trigger etc.

(if you go for distance, don't let querying start before OnCellAttach and stop OnCellDetach, or even better, onCellAttach register for a single GainLos from player to the static you made (not the activator, neither disabled nor primitives fire for los, so that'd double-not work.), and only start querying when that triggers, or do distance checks on single updates only - plus anything else you can come up with to reduce performance impact from getting distance.

User avatar
Trey Johnson
 
Posts: 3295
Joined: Thu Oct 11, 2007 7:00 pm


Return to V - Skyrim