Advertisement
Hattiwatti

Untitled

Dec 26th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class 'ModTest'
  2.  
  3. function ModTest:__init()
  4. print("Initializing Mod Test")
  5. self.m_ReadInstanceEvent = Events:Subscribe('Partition:ReadInstance', self, self.OnReadInstance)
  6. self.m_MyGuidIWantToChange = Guid("D959DF11-EA30-D238-A0D5-5687735963E4", "D")
  7. end
  8.  
  9. function ModTest:OnReadInstance(p_Instance, p_Guid)
  10. -- null verification check
  11. if p_Instance == nil then
  12. return
  13. end
  14.  
  15. if p_Guid == self.m_MyGuidIWantToChange then
  16. print("Found what we wanted.")
  17.  
  18. local chassis = ChassisComponentData(p_Instance) -- this is the fb::WidgetNode class, if it's a fb::Class in EBX, then it's implemented in VeniceEXT (I hope)
  19. chassis.transform.right.x = 0.5
  20. chassis.transform.up.y = 0.5
  21. chassis.transform.forward.z = 0.5
  22. end
  23. end
  24.  
  25. -- Initialize the Base.
  26. local modTest = ModTest()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement