how to collect items into inventory?
hello everyone! Can someone explain me how to do that. My game will be like hidden object (Adventure). Like games "Haunted Manson", "Escape from Laville", "Mystery Light House" For Example: My Player(or Hero) inside of the home. He saw the pliers, screwdriver and e.t.c. And he wants to take them and put them in his suitcase, that to use them in another place( to open the safe box, to fix the electric system e.t c) Can someone give me a right direction or link how to do that. Is it possible in Game salad because I spent 2 weeks of searching how to that. I burrowed into cookbook, all youtube videos downloaded but there is nothing. Yes I know may be someone gives me an advice to read cookbook or search in this community but my english is not good may be I met posts about that but I didn't understand. I'll be grateful. Thanks!
Comments
You will need to have a boolean attribute for each item, this way you can know if the player has collected it into his 'suitcase' or not. Also, for example, to check if the key is collected and if yes then open door.
To collect items, let's take the key as an example again.
When touch is pressed, destroy actor, or move off screen, and change key collected attribute to true.
And when the keyCollected is true you can move the key icon in the desired spot in the suitcase or interpolate its alpha colour to 1.
Then in the door, when touch is pressed, if attribute keyCollected is true -> open door and change scene to the following room.
This is as much as I will say because there is just too much to it. I also recommend you to master tables if you want to make a game like this because have a lot of attributes decreases the game's performance.
www.gshelper.com has a couple great tables tutorials!