Jump to content

petrX1

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by petrX1

  1. Oh my god! I did it! The problem was in .esp file. In MAGIC EFFECT script propeties it's important to make a property, for example, MainScript and set value equals to reference of QUEST. https://www.creationkit.com/fallout4/index.php?title=Variables_and_Properties My mod released.
  2. PJMail, thanks for your respond. I scheduled some tests by compiling in debug mode instead of release, and i began to recieve debug messages (Debug.MessageBox(...)) 1) MCM properly runs scripts, so property SunglassesItem in Deal_with_it:EquipSunglassesMCM is properly setted 2) The second one script have a property Deal_with_it:EquipSunglassesMCM Property MainScript Auto Constand when it runs, self.MainScript==None So i suppose the problem is more general: how to set variable in one script: ScriptName FOLDER:SCRIPT_ONE int Property A function SETA() A=5 endfunctionand recieve this value in the second script ScriptName FOLDER:SCRIPT_TWO FOLDER:SCRIPT_ONE ScriptONE_OBJECT Auto Const function GetA() int A_value = self.ScriptONE_OBJECT.A endfunctionI thought that i have to make corresponding property in esp file in script properties ScriptONE_OBJECT but something goes wrong and one script object doesn't see another script object.
  3. Hi everyone and happy new year! I've tried to make a modification that gives ability to remove helm and equip sunglasses in dialog. I know there is a modification that provides helm removement in dialog (https://www.nexusmods.com/fallout4/mods/24480), but without sunglasses equipping I found the way to edit scripts, but there is some strange problem. My script data consists of two parts: 1) EquipSunglassesEffect ScriptName Deal_with_it:EquipSunglassesEffect extends ActiveMagicEffectDeal_with_it:EquipSunglassesMCM Property MainScript Auto Const Event OnEffectStart(Actor To, Actor From)...Event OnEffectFinish(Actor To, Actor From)... This script attached in ESP to the MAGIC EFFECT dw_HeadGear_EffectRemove,Magic Effect uses in SPELL dw_HeadGear_SpellRemove,there is QUEST dw_HeadGear_QuestRemove that has Alias spell linked to the SPELL dw_HeadGear_SpellRemove, and it works BUT.... 2) I wanna make MCM menu for my mod and choose sunglasses from inventory to equip. For this purpose i did another one SCRIPT ScriptName Deal_with_it:EquipSunglassesMCM extends QuestArmor Property SunglassesItem AutoEvent OnQuestInit()...Function AddEquippedItemsButton() self.SunglassesItem=Game.GetPlayer().GetWornItem(17).Item as Armor this function is attached to MCM button and i want it to save equipped sunglasses in property SunglassesItem...Function ClearItemsButton()... And then i want to get this value in previous function EquipSunglassesEffectself.Sunglasses=self.MainScript.SunglassesItem But is doesn't works(.When dialog is begining, helm removing occurs, but sunglasses doesn't equip.I suppose that self.Sunglasses is None in all cases.if (self.Sunglasses!=None) To.EquipItem(self.Sunglasses, abSilent=True)endif I've tried to make Properties in ESP (Properties - Properties Sorted-property name:SunglassesItem... etc) but it doesn't work. The only variant that works - whith direct searching of specific sunglasses item 0x000E628A in players inventory.Customisation of sunglasses item is an impossible without script changes. What am i doing wrong? Mod is in attachment.How make a different scripts in mod to exchange their own property values? Thanks in advance for help.
×
×
  • Create New...