Hello I have a question, in my game I would like so people can buy houses.... well my problem is I want to make it so only that person who buys the house can enter it, I have thought of ways I could do it such as, have a key in your inventory that lets you go in when you click but only when your (1) space away from your door but I am unsure how to create this..
If anyone could help me that would be great :)
ID:165562
Dec 3 2006, 7:31 am
|
|
In response to Nexus6669
|
|
This should work... |
In response to Dragon_fire6653
|
|
You forgot to mention to nexus he should make something to save the modified variable, a save/load system for houses.
- GhostAnime |
In response to GhostAnime
|
|
GhostAnime wrote:
You forgot to mention to nexus he should make something to save the modified variable, a save/load system for houses. Well, i'm not exactly the best with saving, in fact, I hardly know how to use the built-in procedures as of now, but i'll give it a try... mob/var/Owns_House If you see any mistakes, make corrections please... |
In response to Dragon_fire6653
|
|
No put usr in proc. Told you thousand times. Ungh!
Lummox JR |
In response to Lummox JR
|
|
In addition to that (usr in Movement procs = even more worse :[), I noticed a lil' more:
Write(savefile/F) You need to actually define the savefile (surprise, surprise) and de-indent the owner part... and it may be best to overwrite write() for the obj/house as well --- mob/Login() Again, it needs to be defined (Read() here calls mob.Read(), not obj.Read() as earlier) but in addition to that, IT SHOULD NOT EVEN BE THERE. The logical place to load the saved file is in world/New() --- Enter(M) Like what Lummox mentioned: Don't use usr in procs, specifically in those which can cause your game to screw over with unexpected results :P Movement proc's like Bump(), Enter(),Exited(),etc. definately is a no-usr zone. Not to mention you're checking with if(M=src.Owner)... it's == not = - GhostAnime |
In response to GhostAnime
|
|
Ok so is the code ok to use, except the saving of the code because couldn't I just put it with this part of my saving and loading code
mob |
In response to Nexus6669
|
|
Well, your code currently has a problem during the load. You can't load directly to the x/y/z vars. Instead you need to load those values into temporary vars and use locate() to set the location properly. E.g.:
var/lx,ly,lz Lummox JR |
In response to Lummox JR
|
|
I have found a problem with the first part of the code..
I have used it I can buy the house but when i go to walk into the door it just doesn't do anything. once I buy it it says I bought it but but it still comes up with the buy verb and I can keep buying it and I just can't enter it... Anyone found a way ? |
In response to Nexus6669
|
|
What the hell is going on here when I bump it up to the top so I can still see if I receive help it goes to the top then goes back to where it was and deletes the message I am creating now... I have bumped it 5 times now and it takes the message out and puts it back...
|
In response to Nexus6669
|
|
Nexus6669 wrote:
What the hell is going on here when I bump it up to the top so I can still see if I receive help it goes to the top then goes back to where it was and deletes the message I am creating now... I have bumped it 5 times now and it takes the message out and puts it back... I think that's a subtle hint from the moderators not to bump the message. I think the rules are like the last post made must be at least 24 hours old *and* the thread must be off the first page. The forums aren't a chatroom, and sometimes it takes awhile for someone to read a post and then respond. If the thread's on the first page, there's still a good chance that someone will read it and be able to help. The no-bumping rule has to do with preventing forum clutter. |
In response to Jon88
|
|
Oh I am really sorry :( I just need help with this... I have tried myself alot and I really want to hurry and get this code done. Is there anyone that can correct or help with the code?
|
Remember an old Guild house code only guild house members can enter the house is there anyway this could be used to do what I am doing??