CinnamonMods Posted March 13, 2022 Share Posted March 13, 2022 Hey! I'm very new to fallout 4 modding, so far my mods have been for new vegas. I don't understand the scripting and I can't get this one to work: MiscObject Property ClothesResident7Hat Auto Quest Property BeeDia Auto If (Game.GetPlayer().GetItemCount(ClothesResident7Hat) >= 1) BeeDia.SetStage(20) endIfIt gets the following error: missing EndOfFile at 'If' Can someone explain me how I should do this?I'm trying to make a quest advance once the player has a Newsboy cap in their inventory. Link to comment Share on other sites More sharing options...
DlinnyLag Posted March 13, 2022 Share Posted March 13, 2022 (edited) There is no function in your snippetif/endif statements must appear within function/endfunction I would suggest you to take a look to already existing mods sources to have an idea how to make scriptsAlso you should be more or less familiar with documentation Edited March 13, 2022 by DlinnyLag Link to comment Share on other sites More sharing options...
LarannKiar Posted March 13, 2022 Share Posted March 13, 2022 (edited) Hey! I'm very new to fallout 4 modding, so far my mods have been for new vegas. I don't understand the scripting and I can't get this one to work: MiscObject Property ClothesResident7Hat Auto Quest Property BeeDia Auto If (Game.GetPlayer().GetItemCount(ClothesResident7Hat) >= 1) BeeDia.SetStage(20) endIfIt gets the following error: missing EndOfFile at 'If' Can someone explain me how I should do this?I'm trying to make a quest advance once the player has a Newsboy cap in their inventory. If it's a quest script, it should look like this: Scriptname MyQuestScript extends Quest Const ; Scriptname: MyQuestScript. Extends: Quest (it's a quest script). Const flag: See the link below. MiscObject Property ClothesResident7Hat Auto Const ; Property Quest Property BeeDia Auto Const ; Property Event OnStageSet(int auiStageID, int auiItemID) ; event recieved when a Stage is set If auiStageID == 10 ; Stage 10 is set If (Game.GetPlayer().GetItemCount(ClothesResident7Hat) >= 1) ; if the Player has "ClothesResident7Hat" in their inventory BeeDia.SetStage(20) ; advance the quest to Stage 20 EndIf EndIf EndEvent Read more about "extends" and Const" here. Read more about quest script here. Edited March 13, 2022 by LarannKiar Link to comment Share on other sites More sharing options...
CinnamonMods Posted March 13, 2022 Author Share Posted March 13, 2022 Thank you so much! Link to comment Share on other sites More sharing options...
Recommended Posts