Difference between revisions of "Talk:Enable - ObjectReference"
Jump to navigation
Jump to search
→Parentheses Must Be Left Blank
imported>HawkFest |
imported>HawkFest |
||
Line 49: | Line 49: | ||
Scriptname SimpleLightBulbSwitchScript extends ObjectReference | Scriptname SimpleLightBulbSwitchScript extends ObjectReference | ||
ObjectReference Property LightBulbRef Auto | ObjectReference Property LightBulbRef Auto | ||
Event OnHit(ObjectReference Aggressor, Form Source, Projectile AkProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) | Event OnHit(ObjectReference Aggressor, Form Source, Projectile AkProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) | ||
If Aggressor == Game.GetPlayer() | If Aggressor == Game.GetPlayer() | ||
If | If LightBulbRef.IsDisabled() ;enabling an already enabled light disables it | ||
LightBulbRef.Enable() | LightBulbRef.Enable() | ||
Else | Else | ||
LightBulbRef.Disable() | LightBulbRef.Disable() | ||
EndIf | EndIf | ||
EndIf | EndIf | ||
EndEvent | EndEvent |