Mythaltir Posted April 27, 2017 Posted April 27, 2017 Hello,Im trying to get a character into a faction via scripts, the way i tried i by creating a quest, then when you talk to said character the quest completes, in the objective of the quest the factions are changed. but im having a problem when compiling it says that the Ref alias is undefined. Maybe some of th ebrilliant minds around here will be able to explain to me what am i doing wrong. ;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment;NEXT FRAGMENT INDEX 4Scriptname QF_RikkeMarryFollow_01000D62 Extends Quest Hidden;BEGIN ALIAS PROPERTY Alias_RikkeMF;ALIAS PROPERTY TYPE ReferenceAliasReferenceAlias Property Alias_Alias_RikkeMF Auto;END ALIAS PROPERTY;BEGIN FRAGMENT Fragment_3Function Fragment_3();BEGIN CODEAlias_RikkeMF.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 1)Alias_RikkeMF.GetActorReference().RemoveFromFaction(MarriageExcludedFaction)Alias_RikkeMF.GetActorReference().AddToFaction(PotentialMarriageFaction)Alias_RikkeMF.GetActorReference().AddToFaction(PotentialFollowerFaction)Alias_RikkeMF.GetActorReference().AddToFaction(CurrentFollowerFaction)Alias_RikkeMF.GetActorReference().SetFactionRank(CurrentFollowerFaction, -1);END CODEEndFunction;END FRAGMENT;END FRAGMENT CODE - Do not edit anything between this and the begin comment and these are the errors i am getting QF_RikkeMarryFollow_01000D62.psc(13,0): variable Alias_RikkeMF is undefinedQF_RikkeMarryFollow_01000D62.psc(13,14): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(13,34): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(14,0): variable Alias_RikkeMF is undefinedQF_RikkeMarryFollow_01000D62.psc(14,14): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(14,52): variable MarriageExcludedFaction is undefinedQF_RikkeMarryFollow_01000D62.psc(14,34): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(15,0): variable Alias_RikkeMF is undefinedQF_RikkeMarryFollow_01000D62.psc(15,14): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(15,47): variable PotentialMarriageFaction is undefinedQF_RikkeMarryFollow_01000D62.psc(15,34): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(16,0): variable Alias_RikkeMF is undefinedQF_RikkeMarryFollow_01000D62.psc(16,14): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(16,47): variable PotentialFollowerFaction is undefinedQF_RikkeMarryFollow_01000D62.psc(16,34): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(17,0): variable Alias_RikkeMF is undefinedQF_RikkeMarryFollow_01000D62.psc(17,14): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(17,47): variable CurrentFollowerFaction is undefinedQF_RikkeMarryFollow_01000D62.psc(17,34): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(18,0): variable Alias_RikkeMF is undefinedQF_RikkeMarryFollow_01000D62.psc(18,14): none is not a known user-defined typeQF_RikkeMarryFollow_01000D62.psc(18,49): variable CurrentFollowerFaction is undefinedQF_RikkeMarryFollow_01000D62.psc(18,34): none is not a known user-defined type it may be a really stupid thing, but i really cant see wht it is.
SirDuke Posted April 30, 2017 Posted April 30, 2017 My first impression is, that you did not add factions as "Properties" (The button is labled that way!) There you must define what EXACTLY you mean with "(PotentialFollowerFaction)" f.e. and add this property and point it to the faction you want. (English is just my second language and it´s really hard to find the right words. But in the script you could even write "shittyshittyfactionUpMyAss" and then link the "properties" correct to the REAL PotentialFollowerFaction and the script would work) Which means WITHOUT the right properties, nochting will work. ***edit *** I keep my bad grammar! Even keep my "nochting" I´d add a grammar property "nochting" leading to "nothing" (this should work fine)
SlapMeSilly Posted April 30, 2017 Posted April 30, 2017 Sirduke is on the right path. You need to add the properties of the factions just so they link through to the fragment. You also need to fix the alias name. The alias name as you have it is "Alias_RikkeMF" which is fine. But when the CK creates the properties for an alias it adds Alias_ to the front. So the script version of the alias property is now Alias_Alias_RikkeMF which can be seen when you look at the code. So in your fragment window you would reference it using it's full true name Alias_Alias_RikkeMF not just Alias_RikkeMF. You could name the alias RikkeMF instead and then your existing code is fine as is.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.