Search the Community
Showing results for tags 'miscobject'.
-
EDIT: FIXED Hi, I am creating a Hearthfire build your own home style house for my mod, Midwood Isle. The house works great, however I have run into a problem regarding checking if a room is complete (so that the option to pay to decorate it disappears). I currently have it set up so that when the misc object is created at a workbench, it enables the reference in the room and runs the Function CheckCompletionStatus() This function is setup like this (the example being the library room): The MI_CheckLibraryList is a formlist of all the Misc objects that can be created in the library - currently 35 objects. However, this seems to be very inconsistent.For some of the rooms, it sets the global when I have created like half the objects, and for some it never sets the global once all are created.Additionally, I tried changing it to be == 35, however this also doesnt work. The weird part is when I set it to == 5, sometimes it works and sometimes it doesn't.I was wondering if anyone knew of a problem with using formlists for GetItemCount or GetSize? After banging my head against a wall I tried coming up with a different approach (a bit messy): For this, the DecorationsLibrary points to an array of ObjectReferences (all the references that are enabled in the room). My thinking here was the script would quickly run through the array, and if any are disabled it sets a global that it is incomplete. At the end, if the global hasnt been set, the room is complete.The weird thing here is it causes the exact same issues as the first one. The same rooms that were completed early are still completed early, and the rooms that didn't complete still dont complete. From what I can tell, all the globals, formlists and arrays are identical to each other (except what they contain). The MiscObjects you create at the workbench all have the script calling the function CheckCompletionStatus() - so I have no idea whats different about the rooms. Alternatively, is there a better way for me to remove the dialogue to pay to decorate a room when it is completed? Hearthfire doesn't actually have this feature - so I'm almost tempted to just leave it, but it'd be nice to have. I'm completely lost in this, so would appreciate any advice!
- 3 replies
-
- ck
- references
-
(and 8 more)
Tagged with:
-
Preface: I am going to simplify my scripts to ease troubleshooting. I have script "A", which is used to declare properties that global functions in script "B" can use. Script "A": ScriptName rsAPI_Properties Extends Quest {Contains all the properties for rsAPI scripts} MiscObject Property myMiscObjectProperty Auto Script "B": ScriptName rsAPI_Functions Extends Quest Hidden {Contains all the functions for the rsAPI scripts} ;This function gets the forms from Script "A" rsAPI_Properties Function GetFrameworkProperties() Global return (Game.GetFormFromFile(0x294A97, "MyPlugin.esp") as Quest) as rsAPI_Properties EndFunction ;This function gets a specific form from Script "A" with the help of the above function. MiscObject Function GetMiscObject() Global return GetFrameworkProperties().myMiscObjectProperty EndFunction ;This function is an example of how I would like to handle the miscobject passed from Script "A" Function GivePlayerMiscObject(int howMany) Global Game.GetPlayer().AddItem((GetMiscObject()), howMany); I have tried declaring a MiscObject outside this command as well, but neither worked. EndFunction The second function in Script "B" is used to return a miscobject, but it only returns NONE. This way of obtaining a property from another script seems to only work for certain types of forms. The properties have been defined in the CK in Script "A". Any pointers papyrus wizards? p.s. The reason I am approaching it this way is because Script "A" and Script "B" are an API of sorts. I want to use a function in Script "B" that references properties in Script "A" after passing parameters directly from Script "C", which would utilize the third function in Script "B" like this: Script "C": ScriptName GivePlayerItem Extends Activator {Utilizes the rsAPI framework to give the player 2 MiscObjects} Event OnActivate(Actor akActionRef) rsAPI_Functions.GivePlayerMiscObject(2) EndEvent Has anyone had any luck returning a form aside from Globalvariables in this context?
- 12 replies
-
- miscobject
- global
- (and 7 more)
-
Sooo... i'm trying to make a quest. You go, get an amulet for someone, you give him the amulet, he gives you a gold reward (double the value of the amulet) and gets to be your follower. I think I got everything right but the gold reward part. I've set this script for the last quest stage: SetObjectiveCompleted(15, 1) Alias_QuestGiver.GetActorReference().AddItem(Alias_QuestItem.GetReference()) Alias_QuestGiver.GetActorReference().SetRelationshipRank(Game.GetPlayer(), 1) Game.GetPlayer().AddItem(Gold001, Alias_QuestItem.GetReference().GetGoldValue() * 2) But when I try to compile the script, the following error appears: Starting 1 compile threads for 1 files... Compiling "QF__0200623D"... C:\Games\Steam\SteamApps\common\skyrim\Data\Scripts\Source\temp\QF__0200623D.psc(47,25): Gold001 is not a variable No output generated for QF__0200623D, compilation failed. Batch compile of 1 files finished. 0 succeeded, 1 failed. Failed on QF__0200623D I've searched on Google, and it seems I need to make an object property script thing to the gold. But I can't do it... I searched about it but everything I did went wrong >:I Can somebody help me?
- 30 replies
