Jump to content

Trouble With Scripting A Custom Companion


Recommended Posts

Okay, so, I'm brand new to mod making. I've worked in the GECK for about a month and a half, and, the FO4 Creation Kit for about five weeks. It's really hard for me to get used to Papayrus scripting. On to the problem at hand. I followed a tutorial on how to make a simple companion. I got to the end of the tutorial, to the scripting of hiring the NPC and no matter how hard I tried, I couldn't get it to work. I got the properties right, but the alias I was putting in was failing to compile. It kept coming up with "variable 'AliasDocWife' is undefined. Please help.

 

FollowersScript.GetScript().SetCompanion(AliasDocWife.GetActorReference())

Link to comment
Share on other sites

Here is the error I got:


Papyrus Compiler Version 2.8.0.4 for Fallout 4

Copyright © ZeniMax Media. All rights reserved.

Starting 1 compile threads for 1 files...

Compiling "Fragments:Quests:QF_DocWifeCompQuest_05001737"...

C:\Users\Dylan.HOME\AppData\Local\Temp\PapyrusTemp\Fragments\Quests\QF_DocWifeCompQuest_05001737.psc(7,41): variable AliasDocWife is undefined

C:\Users\Dylan.HOME\AppData\Local\Temp\PapyrusTemp\Fragments\Quests\QF_DocWifeCompQuest_05001737.psc(7,54): none is not a known user-defined script type

C:\Users\Dylan.HOME\AppData\Local\Temp\PapyrusTemp\Fragments\Quests\QF_DocWifeCompQuest_05001737.psc(7,54): type mismatch on parameter 1 - cannot pass a void to a actor

No output generated for Fragments:Quests:QF_DocWifeCompQuest_05001737, compilation failed.


Batch compile of 1 files finished. 0 succeeded, 1 failed.

Failed on Fragments:Quests:QF_DocWifeCompQuest_05001737
Link to comment
Share on other sites

AliasDocWife is undefinfed means that the game does not know what is this variable . To define the alias you create a property

ReferenceAlias Property MyAlias Auto Const

(Replace MyAlias with any Alias name you need to use in the script. AliasDocWife in this case)

Then you fill this property by choosing your quest and your alias. Not sure how it works with fragments..I never used fragments...But this is how it works in unsual scripts and this is what the compiler wants from you.

Edited by kitcat81
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...