MuteButtonHero Posted July 28, 2017 Posted July 28, 2017 When a constructable object is designed it includes a Created Object Count that normally is a hard coded integer.Is there a way to make that count use a game setting for that value instead? Has anyone come up with a work-around?
stonefisher Posted July 29, 2017 Posted July 29, 2017 Its not. Select the number in the constructable object recipe and type in a new one.
JonathanOstrus Posted July 29, 2017 Posted July 29, 2017 On 7/28/2017 at 11:52 PM, MuteButtonHero said: When a constructable object is designed it includes a Created Object Count that normally is a hard coded integer. Is there a way to make that count use a game setting for that value instead? Has anyone come up with a work-around? No you cannot change the value on the fly like you're describing. There are however two options I see.Have multiple recipes with the appropriate number of created objects that you want. Use a global value or some other conditions on each recipe to hide the ones you don't want, and display the one you do. This requires creating multiple recipes.Use an intermediate object that you craft, which has a script attached. That script in it's onInit() or oncontainerchange() removes the object itself that triggers from being crafted from the player, then adding in the number of real objects you want. This requires just creating one recipe and can adjust the number of supplied items via the global variable used by the script. You could use the same script with appropriately configured properties to handle multiple recipes. For properties you would just need to have a global value that you'll use as the num items to give, and a form of the item to give. Something like this should do it. Reveal hidden contents Scriptname dummyItemSwapScript Extends ObjectReference Form Property ItemToGive Auto Const GlobalValue Property NumItemsToGive Auto Const Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) if akNewContainer != Game.GetPlayer() ; make sure the new container is the player return endif akNewContainer.AddItem(ItemToGive, NumItemsToGive as int, false) ; the false tells it not to display the message that it added items. akNewContainer.RemoveItem(self) EndEvent On 7/29/2017 at 12:55 AM, stonefisher said: Its not. Select the number in the constructable object recipe and type in a new one. I think what OP meant by "hard coded" is that it is set at CK build time. If I understand correctly OP wants to change how many are crafted on the fly from in game, probably via a quest stage or something.
Recommended Posts