Difference between revisions of "Inter-mod Communication"

41 bytes removed ,  07:28, 4 August 2016
m
→‎How To Get A Form From Another Mod: The example was wrong - Form cannot be cast as Actor. I've fixed it.
imported>Docclox
m (→‎How To Get A Form From Another Mod: The arguments in GetGameFromFile were in the wrong order.)
imported>Docclox
m (→‎How To Get A Form From Another Mod: The example was wrong - Form cannot be cast as Actor. I've fixed it.)
Line 40: Line 40:
Example:
Example:
<source lang="papyrus">
<source lang="papyrus">
Form newCompanionForm = Game.GetFormFromFile(0x00015A4F, "SpecialCompanion.esp")
Actor newCompanion = Game.GetFormFromFile(0x00015A4F, "SpecialCompanion.esp") as Actor
Actor newCompanion = newCompanionForm as Actor
if newCompanion
if newCompanion
   ; We've got ahold of the new companion from that other mod, maybe we can give them one of our special armor pieces?
   ; We've got ahold of the new companion from that other mod, maybe we can give them one of our special armor pieces?
Anonymous user