![]() |
Personalized rooms
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. ;) |
Hmmm Maybe....
how about,
if the image is the blue couch if (playerchats&&strequals(#c,Right)) { setimg bluecoughright.gif; } if (playerchats&&strequals(#c,Left)) { setimg bluecoughleft.gif; } if (playerchats&&strequals(#c,Down)) { setimg bluecouch.gif; } and so on :) |
Stefan does'nt want complex NPCs in houses and he's removing those personal rooms so i've heard
|
x.x
Hmmm
if there is any scripting its probly me FrEaKy CaRnIe ( Known as Da7footdude) |
Re: Hmmm Maybe....
Quote:
And Merlin, that silly. What's wrong with NPC's? |
Re: Re: Hmmm Maybe....
Quote:
|
why not just make it so that it moves 2x,2y when u say up down left right????? and use a onwall script to keep the player from putting it on hte wall like make it go back to the middle of hte room if onwall?????i aint to abd at scripting but tell me if this would werk!!
|
No merlin, stefan meant he doesn't want personal npcs that work only according to a certain username.. If somehow you could change the username through the npc then it would be fine.. like "this.owner" or something.. I don't know the value or string for the owner of a house, but it would need to be similar to that. Not something like:
if (playerchats&&strequals(#c,blah)&&strequals(#a,acc ountname){ He doesn't want certain account names.. it would have to be a guild, or a changeable string. ;) |
just
why dont you make it where you use the pics1.png ....
if (playerchats && strequals(#c,object bed)) { setimgpart pics1.png ...... and so on ... then have it where the player can edit the direction and stuff too ... |
Just to tell ya, that idea was done already, it was a project Maxim and I made up where you could buy a house, and then have to buy the furnishings and stuff.
The railroad track builder format is a good way of doing it. *reads Kai's post* Aww... crap, someone else did it too =(. |
Quote:
|
Quote:
|
Quote:
but, i got to admit, you two are very good from what ivew seen, i presume you do other scripting to? and i thought lady m was good too, she always seems to have an answer for everyones script problems :) |
Quote:
|
Aargh, already been done? Twice? Ah well, great minds think alike. :rolleyes:
Although, something like the edited railroad builder would be very nice, but require some pretty advanced scripting. Also, I wasn't aware that you could use pics1.png in setimg --- thanks for the tip. :) |
Oh, then you can just use level.strings for the master key
|
i got a great idea how you can do it and i've got it almost done..........make a hotel and sell keys per room and if the player has that key then they cna move the furniture around.......i am finishing it up right now!!!!
|
If fizie were a cow, I swear I'd never eat another hamburger again....
-Rebel95 |
**middle fingers slowly goes up facing Engima_GP6,Rebel95,
i'd like you to script it smart @$$$$!!!! sry i couldnt finish the room today but tomorrow i will and put it up on the forums okie? kk L8 ALL '~BrIaN~' |
Don't you just love newbies? :D
This script would be nice.. anyone mind sending it to me? It would be cool to have on the 2001 server for player rooms.. Of course if it doesn't cause major lag or anything. :) |
hahaha aint laggy at all i just gotta finish a few scripts with the light turning on and off
|
wha?
wha?
|
Quote:
|
Quote:
|
:spam:
|
Quote:
|
| All times are GMT +2. The time now is 10:41 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.