GetLightLevel trouble...

Post » Thu Jun 21, 2012 6:43 pm

Can anyone tell me what I'm doing wrong? Does this function work on NPCs at all or just on the player?
It's a Spell+MagicEffect attached to actors. I can use my GrabbedActorID variable to apply other effects to grabbed targets, so it should be valid.


This gives me a compile error ( GetLightLevel is not a function or does not exist):

Scriptname test extends activemagiceffectObjectReference GrabbedActorIDEvent OnGrab()GrabbedActorID = Game.GetPlayerGrabbedRef()endEventEvent OnRelease()  Debug.MessageBox(GrabbedActorID.GetLightLevel())endEvent

But this compiles and works ingame:


Scriptname test extends activemagiceffectObjectReference GrabbedActorIDEvent OnGrab()GrabbedActorID = Game.GetPlayerGrabbedRef()endEventEvent OnRelease()  Debug.MessageBox(Game.GetPlayer().GetLightLevel())endEvent
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

Post » Thu Jun 21, 2012 8:17 am

ok, figured out myself. stupid mistake, getlightlevel needs an actor object not objectreference
User avatar
oliver klosoff
 
Posts: 3436
Joined: Sun Nov 25, 2007 1:02 am


Return to V - Skyrim