Advertisement
Guest User

Untitled

a guest
Sep 16th, 2017
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.35 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.  
  31. EndFunction
  32.  
  33. Event OnKeyDown(int iKeyCode)
  34.  
  35. if (iKeyCode == 35) && (!bIterating)
  36.  
  37. bIterating = true
  38.  
  39. While iFormListIndex <= iNestedFormlistCount
  40.  
  41. iFormListIndex += 1
  42. formlistCurrent = AAAFyTy_PhysicsItemsMasterFormList.GetAt(iFormListIndex) as FormList
  43. objrefarrayFoundItems = PlayerRef.FindAllReferencesOfType(formlistCurrent, 300)
  44.  
  45. iFoundItemsCount = objrefarrayFoundItems.Length
  46.  
  47. if iFoundItemsCount > 0
  48.  
  49. While iFoundItemIndex <= iFoundItemsCount
  50.  
  51. iFoundItemIndex += 1
  52. objrefarrayFoundItems[iFoundItemIndex].SetMotionType(2, true)
  53.  
  54. EndWhile
  55.  
  56. EndIf
  57.  
  58. EndWhile
  59.  
  60. AAAFyTy_ItemPhysics_DoneMessage.Show()
  61. ClearTheVariables()
  62.  
  63. EndIf
  64.  
  65. EndEvent
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement