Advertisement
Guest User

Untitled

a guest
Sep 16th, 2017
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. Scriptname FyTyTweaks:AAAFyTy_ItemPhysics_HotkeyQuestScript extends Quest
  2.  
  3. Actor Property PlayerRef Auto Const
  4.  
  5. FormList Property AAAFyTy_PhysicsItemsMasterFormList Auto Const
  6.  
  7. Message Property AAAFyTy_ItemPhysics_DoneMessage Auto Const
  8.  
  9. int iFormListIndex = 0
  10. int iNestedFormListCount = 0
  11. FormList formlistCurrent
  12.  
  13. bool bIterating = false
  14.  
  15. ObjectReference[] objrefarrayFoundItems
  16. int iFoundItemsCount = 0
  17. int iFoundItemIndex = 0
  18.  
  19. Event OnInit()
  20.  
  21. iNestedFormListCount = AAAFyTy_PhysicsItemsMasterFormList.GetSize()
  22. RegisterForKey(35)
  23.  
  24. EndEvent
  25.  
  26. Function ClearTheVariables()
  27.  
  28. iFormListIndex = 0
  29. iNestedFormlistCount = 0
  30. formlistCurrent = None
  31. bIterating = false
  32. objrefarrayFoundItems = None
  33. iFoundItemsCount = 0
  34. iFoundItemIndex = 0
  35.  
  36. EndFunction
  37.  
  38. Event OnKeyDown(int iKeyCode)
  39.  
  40. if (iKeyCode == 35) && (bIterating == false)
  41.  
  42. bIterating = true
  43.  
  44. While iFormListIndex <= iNestedFormlistCount
  45.  
  46. iFormListIndex += 1
  47. formlistCurrent = AAAFyTy_PhysicsItemsMasterFormList.GetAt(iFormListIndex) as FormList
  48. objrefarrayFoundItems = PlayerRef.FindAllReferencesOfType(formlistCurrent, 300)
  49.  
  50. iFoundItemsCount = objrefarrayFoundItems.Length
  51.  
  52. if iFoundItemsCount > 0
  53.  
  54. While iFoundItemIndex <= iFoundItemsCount
  55.  
  56. iFoundItemIndex += 1
  57. objrefarrayFoundItems[iFoundItemIndex].SetMotionType(2, true)
  58.  
  59. EndWhile
  60.  
  61. EndIf
  62.  
  63. EndWhile
  64.  
  65. AAAFyTy_ItemPhysics_DoneMessage.Show()
  66. ClearTheVariables()
  67.  
  68. EndIf
  69.  
  70. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement