I started toying around with the idea of giving the player the ability to reaarange their room this morning, and I've been planning and messing around with the code for the past ten minutes or so. I've found that there's a few ways I could make it, and I'd like some advice as to which to do. Keep in mind that this is my first scripting project --- I've never made a real NPC by myself in my life.
The most sophisticated and ideal way would be how I was planning on doing it in the first place --- chat commands. For instance, if the player says "move itemname left," said item moves left, or the specified direction (up, down, left, right). Unfortunately, this would require the creation of onwall detection, which I don't think I'm quite ready for yet. Also, if it was used in a playerhouse setting it would take a bit more scripting to keep all the pieces of furniture from moving at once. I've thought of ways to solve this, all of them rather sloppy.
Another, simpler way would be to hide and show the images. For instance, should the player say "itemname left corner" the item would move to that corner. There's very little chance I'll use this
system, as it would severely limit the players options, and would allow the player to stack the furniture on top of each other. Yech.
The easiest way, obviously, is to use canbepulled and canbepushed, so that the player has to drag the items around the room. This would solve all of the problems previously mentioned, but it seems a little cheap to me; like I'm taking the easy way out. I'd add the ability to remove and add items using hide and show, but I still don't like that it would take all of five minutes to script. I may not be at a very advanced level (or even an intermediate level for that matter) but I'd like to at least give myself a bit of a challenge.
Any suggestions? Comments? Methods I didn't think of? Anything would be appreciated. Also, can someone tell me why it's better to use playerchats with strequals instead of just playersays? Kaimetsu only flamed me when I said I used playersays, without explaining why I shouldn't.
