#11, z afrlmeWednesday, 08. June 2016, 14:49 hodinky 9 years ago
Development is all about conditions (boolean) & values (integer / float), which you use to determine the state of all the content in your game / app.
Let's say you have a glass on a shelf & you want to take the glass & place it on your kitchen unit...
1. we create a condition (preferably in the scene conditions tab) & name it something like "glass_taken" & we set the default value to false.
2. create an object in the scene, name it as "itm_glass" & add an image to it of the glass, then create an object area around the glass (this is the interaction polygon), then assign the condition you created to the properties tab & tick the "negate" option (negate is false value) at the side of it. What this will do is only show the object if the value of the condition returns false.
3. inside of the actions tab create an executed command on scene object action & link it to one of your commands "take" or whatever your default command is, if you are using a single click (broken sword style command interface) & inside of this add a add item "glass" action & then a set condition "glass_taken" to true action.
Now when you interact with the glass, it should be added to your inventory & hidden from the scene.
4. create another object in which you will add the glass image & position it so it's on the kitchen unit. Create a new condition called "glass_placed", set it as false by default & assign it to the properties tab of the object you've just created.
5. Create an object for the kitchen unit (table) & create an item dropped (dragged items) or command executed with item selected action (depending on how you are handling items) & inside of this add a remove "glass" from inventory action & then a set condition "glass_placed" to true.
This should remove the glass from your inventory & make it appear on the kitchen unit (table).
Hopefully you'll be able to make heads & tails out of what I've just written. See the P.S below as to why I can't currently provide screenshots / examples.
P.S: sorry, I don't currently have photoshop installed as I did a fresh install of windows the other day & haven't re-installed all my programs yet, so I'm not able to mock-up a quick example.