Running an OnLoad block on a disabled item
Jump to navigation
Jump to search
OnLoad blocks won't run on Disabled items, but they can be useful for tasks like initialising variables. If you want to disable an item, but still run an OnLoad block on it, you can use the following code:
RefID.MoveTo player RefID.SetScale 0
This will cause the item to disappear, as if it had been disabled, but its OnLoad block will still run.
Notes
- This shouldn't be used on Actors or quest targets, as Actors will still be able to attack the player (although they won't be able to move), and the compass will still show Actors and quest targets with a scale of 0.