Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scriptname FyTyTweaks:AAAFyTy_ItemPhysics_HotkeyQuestScript extends Quest
- Actor Property PlayerRef Auto Const
- FormList Property AAAFyTy_PhysicsItemsMasterFormList Auto Const
- Message Property AAAFyTy_ItemPhysics_DoneMessage Auto Const
- int iFormListIndex = 0
- int iNestedFormListCount = 0
- FormList formlistCurrent
- bool bIterating = false
- ObjectReference[] objrefarrayFoundItems
- int iFoundItemsCount = 0
- int iFoundItemIndex = 0
- Event OnInit()
- iNestedFormListCount = AAAFyTy_PhysicsItemsMasterFormList.GetSize()
- RegisterForKey(35)
- EndEvent
- Function ClearTheVariables()
- iFormListIndex = 0
- iNestedFormlistCount = 0
- formlistCurrent = None
- bIterating = false
- objrefarrayFoundItems = None
- iFoundItemsCount = 0
- iFoundItemIndex = 0
- EndFunction
- Event OnKeyDown(int iKeyCode)
- if (iKeyCode == 35) && (bIterating == false)
- bIterating = true
- While iFormListIndex <= iNestedFormlistCount
- iFormListIndex += 1
- formlistCurrent = AAAFyTy_PhysicsItemsMasterFormList.GetAt(iFormListIndex) as FormList
- objrefarrayFoundItems = PlayerRef.FindAllReferencesOfType(formlistCurrent, 300)
- iFoundItemsCount = objrefarrayFoundItems.Length
- if iFoundItemsCount > 0
- While iFoundItemIndex <= iFoundItemsCount
- iFoundItemIndex += 1
- objrefarrayFoundItems[iFoundItemIndex].SetMotionType(2, true)
- EndWhile
- EndIf
- EndWhile
- AAAFyTy_ItemPhysics_DoneMessage.Show()
- ClearTheVariables()
- EndIf
- EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement