RPG Style Equipping Items/Item Slots

sneakydustsneakydust Member Posts: 5
edited May 2012 in Working with GS (Mac)
Hi all,

Im in the early stages of thinking about creating an RPG style game using GameSalad.

I want the player to be able to drag his items from a "backpack" and drop the item into its respective "equipped" slot. When the new item is dropped into the slot I want the replaced item to snap back into the backpack.

Ive played around with a few ways of (attempting to) do this, but nothing has worked well and with minimal rule-making.

Does anyone know how this can be achieved or have any ideas?

Thanks :D

Answers

  • BSideGamesBSideGames Member Posts: 392
    make a true/false attribute for each item
    then have rule that says if true change self position to the location of slots x and y
    in the otherwise have rule say if false change self position to location of backpack slots x and y

    that way as the player drags items from backpack to slot and back again all you have to do is change one attribute

    I hope that helps

    Asher
  • sneakydustsneakydust Member Posts: 5
    That is a good idea.

    I had a similar thing set up, though the problem was getting the "unequipped" gear going to an empty "backpack" slot. Whenever I was to equip a new item, the old one would go back to the backpack into the first like, rather than the first empty slot, meaning that it would go over the top of other gear.

    Any idea how I can get unequipped get to revert to empty slots? And by the same token, prevent a player from picking up more gear than he has empty backpack slots open?

    Thanks for your help :)
  • BSideGamesBSideGames Member Posts: 392
    picking up gear is the easy one just make an attribute that count the amount of slots used

    so "slots used + 1" each time an item goes into a slot "slot used - 1" each time it goes back into backpack
    that way your drag and drop rule can also say if slot used is less then number of slots you have

    the other ? is a tricky one i'll have to think on it for a bit
  • GLGAMESGLGAMES SingaporeMember Posts: 988
    yuh, drag n drop is definitely tougher . My idea was just a switch graphic on the appropriate equipment slot when the item is clicked in the inventory.
Sign In or Register to comment.