Jump to content

Requiring books to unlock new recipes?


Thicketford

Recommended Posts

I've made a custom recipe that uses the cooking pot. Is it possible to hide the recipe until a particular book is read by the player? I've had a look at the conditions available, but I'm not sure if such an option exists. Any help would be greatly appreciated.

Link to comment
Share on other sites

I've made a custom recipe that uses the cooking pot. Is it possible to hide the recipe until a particular book is read by the player? I've had a look at the conditions available, but I'm not sure if such an option exists. Any help would be greatly appreciated.

it's possible to do it with a script.

Make a script that flips a global when you read the book.

 

Then make the recipe check the global.

Link to comment
Share on other sites

I'm completely new to scripting, so please forgive me if any of this sounds dumb.

 

I've created a global with a value of '0'. I believe I've set the conditions in the recipe correctly, so that it will only activate when the global is set to '1'. Now I just need to figure out a script to change the global when I read the book.

 

For reference...

 

Recipe book is 'JournalRecipe'

Global is 'AllowRecipeGlobal'

 

I'm not really sure how I'm supposed to reference the global in the script.

 

 

 

Scriptname allowrecipe extends ObjectReference

ObjectReference property JournalRecipe auto

Event OnRead ()
if !Self.IsRead()
<Not sure what this line should be>
endif
endEvent
Edited by Thicketford
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...