Advertisement
expired6978

UCF Compatibility

Apr 13th, 2016
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. ; -------- Compatibility Code ----------
  2. Form akUCF = Game.GetFormFromFile(0xEFF, "EFF.esp")
  3. If akUCF
  4. ScriptObject akCompanionManager = akUCF.CastAs("EFF:CompanionManager")
  5. If akCompanionManager && akCompanionManager.GetPropertyValue("CurrentVersion") >= 3
  6. Var[] Params = new Var[2]
  7. Params[0] = self
  8. Params[1] = "OnIterateCompanion"
  9. FollowerScript.GetScript().CallFunction("ForEachCompanion", Params)
  10. ; Not called on CompanionManager because its only one of potentially many
  11. ; The FollowerScript override will broadcasting to multiple managers if necessary
  12. Endif
  13. Endif
  14.  
  15. ; --------------------- Handler Code -------------------------
  16. Function OnIterateCompanion(ObjectReference akRef)
  17. ; Do stuff here, this will be called per companion
  18. ; this function is not waited on, may be executed asynchronously
  19. EndFunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement