I wanted build-able turf for my game...
Not placing objects onto turf, but an actual conversion of that turf.
But this raises a few questions.
First i'm sure you'd do something like
turf
vars/whatever
verb
Build_Item()
whatever
but 1 think i need to know, is(when i right click) i dont want all this huge list showing up for stuff the player shouldnt be able to build yet.
How do I hide what i dont want showing at that time?
Another concern is: When i build my structures, i can simply replace an item by clicking on it, and selecting what i want to build. I want to stop this.
I want to make it so that if that space is occupied by a current structure, that it has to be razed(deleted) before being able to build in that slot.
Also another concern of mine,
I was going for an RTS feel, so i made it so i could move the keyboard keys (causing the client eye to move , instead of the character)
But it made all my structures not build, because i wanted players only to be able to allowed to build what is near them. So i am currently just spawning the mob, at coords that are near what i am working on.
What i really want is to have players select a place on the map to start, that be saved as their perm coords, and they can only build within a radius (either view, or view(5)..whatever...)
but still allowing arrowkeys to control client eye, not the player, like i have now.
An alternative to players not build where-ever would be, having ownable turf....allowing players to only build on turf they own.
Could someone walk me through, and explain the working of these things, I have a pretty good idea how to do most of this, just not working how i would expect.
ID:155423
![]() Jul 11 2011, 10:46 am
|
|
![]() Jul 11 2011, 1:00 pm
|
|
Was wondering if anyone could explain before my day off ends? lol
|
hm, but would that be just 1 var, or multiple vars?
Could you be more detailed? I'm guessing your meaning something like: turf var Check_Structures() //do stuff here? Edit: Nvm i just posted a proc >.< silly me. |
Just one, the turf you want to build will be the var/buildnext. It's probably best to store it as the atom rather than a text string.
|
Well when you say var it really goes right over my head, because when i think of var i think of
var/Building1 var/Building2 Then to check to see if they have that. I dont quiet understand how to go about making a var for checking to see if a certain plot in the game is occupied by a structure already. unless it would be a var under turf? then something like turf var/Occupied then make a proc to check to see if it is? Would that work? And if so, could you walk me through that? |
mob The idea of storing the path as the var is so it's easier to call a new() proc on it. |
Still not accomplishing what i wanted.
Might have to take this to 'code problems'. I mean i get what your saying, but thats not helping me accomplish 1 object per build like i requested. I am already able to build turfs in my game, and deduct resources effectively through vars. What i really need is not allowing more than one object to be in the same spot. I'm not quiet understanding how your code you presented will lead to that - if it does, please advise. |
Well for that you would have to devise a way to delete an existing turf and replace it with the new one. This is very easy to do using a get_step() proc.
|
I have been working on a resource management game
and had some of the same problems http://www.byond.com/developer/forum/?id=681477 |
Maybe set a var for the turf like builable. When its built upon, set it to one. When checking to see if it can be built on, a simple if statement could figure out whether or not it can be built on. If(buildable=1) then state, object must be removed, else build object? Just throwing that out there. And as for the hiding the verbs, just set then as hidden as stated in the guide, chapter 4 verbs.
|