Can't disable light in script

Post » Sat Nov 17, 2012 11:46 pm

Hello, I would like to ask for help with the simple script.

I created an ObjectReference property in the script and assigned a certain OmniLight to it.

Spoiler

Scriptname UnCaveScr_KillerBear extends Actor{Bear combat script}Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)if akAggressor == game.getPlayer()  Debug.Notification("Disabling...")  UnCav_BearLight.Disable()endifEndEventObjectReference property UnCav_BearLight Auto

I am trying to get this light disabled (turn off) when i hit certain monster. Script is attached to a base object of this monster.

I see notification message in game when i hit that monster, but the light doesn't go off (

Edit: Hmm... could the problem be, that I assign property value for the script in base object dialog... Maybe i should do it for reference of my monster placed in render window?

Edit 2: Ok, i solved the problem myself :)
User avatar
Natasha Biss
 
Posts: 3491
Joined: Mon Jul 10, 2006 8:47 am

Return to V - Skyrim