Difference between revisions of "Talk:Enable - ObjectReference"
→Parentheses Must Be Left Blank
imported>HawkFest |
imported>HawkFest |
||
Line 57: | Line 57: | ||
LightBulbRef.Disable() | LightBulbRef.Disable() | ||
EndIf | EndIf | ||
EndIf | |||
EndEvent | |||
</source> | |||
'''Alternative''' - Since enabling an enabled light Bulb disables it, one could come up with a much simpler script exploiting this glitch. Note that doing this can be dangerous, as would be any script exploiting any glitch, because a glitch has the potential to get repaired. Consequently the script itself has the potential to become flawed : | |||
<source lang="papyrus"> | |||
Scriptname SimpleLightBulbCollisionSwitchScript extends ObjectReference | |||
ObjectReference Property LightBulbRef Auto | |||
Event OnHit(ObjectReference Aggressor, Form Source, Projectile AkProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked) | |||
If Aggressor == Game.GetPlayer() | |||
LightBulbRef.Enable() | |||
EndIf | EndIf | ||
EndEvent | EndEvent |