How would you guys go about making a paperdoll equipment system using a interface? I've tried to do it but failed and could use some help.
Examples:
http://imageftw.com/uploads/20120131/SF_equipment.PNG
http://www.byond.com/games/hubpic/102846_11689.png
http://www.maps4heroes.com/heroes5/pictures/mods/ inventory_mod.jpg
Jan 21 2013, 12:47 am
|
|
How's this related to Design Philosophy?
|
In response to Zaoshi
|
|
Zaoshi wrote:
How's this related to Design Philosophy? He wants to know what steps to take to make one, he's not really asking for specific code (at least that's my understanding) |
In response to Dariuc
|
|
Dariuc wrote:
Zaoshi wrote: |
I would say it's a design philosophy question as there's many ways to get a system like this working, depending on what you want to do with it...
One way would be grid that don't have a discernible look to them but can still be interacted with. You could then have images/icons appear in specific cells of the grid depending on where you want the item to be, and the other grid cells just won't have any interaction. Example: [_][_][_] [_][_][_] [_][_][_] [_][_][_] let's say I wanted to use this 3x4 grid for an equipment screen. [_][x][_] [x][x][x] [_][x][_] [_][x][_] This could be an example of the interactable grid cells (defined by code). Now, normally the grid won't show lines or anything of the sort. What you can do though, is create icons that go in those cells that represent the empty slot, giving a nice style and an obvious position for the items. You will, of course, have to work with some mouse drag/drop code to get something like this to work. At the same time, your inventory could be another grid populated by all your items. Another way to get this to work is with labels and a bunch of variables and a clusterf*** of code, it's best to just use grids in this case though. All in all, this is probably one of the better ways to go about equipment in a game instead of just having random stuff you can put on/remove. Seriously, tons of games on BYOND use a system that allows you to put on 5 shirts at the same time. It's silly. |
Lol I agree one reason I need this and its more effective. I still can't find a good way to get it and I know I have to use a grid system for it to work most effectively. I'll be coming back here if I figure anything out.
|
Well, getting it to work with a grid system isn't too hard. Just make a 3x4 grid control and make it a drop-zone in the options.
Then you'd set it up that, on startup, it fills the cells with whatever item slots you want. For example lets say the ehad is the top center so it would be cell 1,2 (I think) and you can use output() to display an icon in there. Then what you would do is make it so that, when you drop an item on there, it gets the cell you dropped it to and checks which item type is supposed to go there. If the types don't match, it does nothing (or gives the user an error). If it does, it equips the item, and then the item calls its personal equip code which will change what's displayed in the grid. Or at least that's how i'm doing it and it works great. |
I don't understand what the problem is... This type of thing is very simple to do
obj/thing/one |