Talk:OnUpdate - Form
OnUpdate event not running on weapon
I have attached a script to a weapon that says somthing like this,
Event OnEquipped() RegisterForUpdate(5) Debug.Notification("Registered") EndEvent Event OnUpdate() Debug.Notification("Updating") EndEvent
When I Equip the Weapon I get the "Registered" message but i never get the "Updating" message.
Anyone have any idea why?
- I've heard reports of this behaviour before. If I remember correctly, it can be fixed by dropping the weapon then picking it back up again. The issue is likely due to the fact that inventory objects are not treated in the same way as "real" references.
- It would be nice to get this confirmed so the information could be added to this page.
- P.S. Please wrap any code you post in <source> tags like this:<source lang="papyrus">Here is my code</source>
- That will maintain formatting such as indentation, as well as using a fixed-width font and adding appropriate syntax highlighting.
- -- Cipscis 15:40, 6 March 2012 (EST)