Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: Odd_But_Awesome on August 26, 2019, 09:59:31 AM

Title: Basic Crafting system tutorials?
Post by: Odd_But_Awesome on August 26, 2019, 09:59:31 AM
Hi all,

Just wondering if anyone knows of any basic crafting tutorials using PM. Or if you have any advice on where to start.

My game has 4-5 materials and around 20-30 recipes.

Thank you.
JG

Title: Re: Basic Crafting system tutorials?
Post by: Thore on August 26, 2019, 04:38:39 PM
Not entirely PlayMaker, but a good case to use scriptable objects.

See this first:
https://hutonggames.com/playmakerforum/index.php?topic=20829.msg91326#msg91326

Then see the video also attached in that post:
Title: Re: Basic Crafting system tutorials?
Post by: djaydino on August 27, 2019, 01:40:16 AM
Hi.
I don't know any direct tutorials, but For the data part i think i would use Xml with dataMaker for this and probably some hash table build up the data @runtime.

Basically you would have an Id for your objects that you can craft and then the required materials.

Then it kind of depends how you are planning to do the Craft system.

for example if you would select an object to craft:
On select, check the materials needed and then check if materials are in the inventory.

Probably its best to use some arrays for your inventory and loop thru them.
Title: Re: Basic Crafting system tutorials?
Post by: Odd_But_Awesome on August 27, 2019, 10:13:11 AM
Hi,

Thanks for the replies.

I will check out the links now.

I have also been meaning to look into arrays. I ve not had an opportunity to use them in a project before.

Cheers! :)