ID:167783
Jan 29 2006, 8:36 am (Edited on Jan 29 2006, 11:29 am)
|
|
Is it possible to define an atom like mob, obj, and turf? If this is possible, can you explain how i would do this?
|
In response to XxDohxX
|
|
He probably means creating a new atomic path type that can be on the map, but act differently than the existing ones. You can't do that, but tell us what you want to do, because you probably won't need to do anything like that.
~~> Unknown Person |
In response to Unknown Person
|
|
I want to make something that works like an object, but can't be picked up by the "Get" verb. Here's my Get verb:
mob/verb/ It picks up any object that's under you. The only problem is, in order to make something "un-getable", I have to set them to turfs or mobs, and I don't want to do that. (Don't ask me what the mob/M as mob in view(0) part is for, I didn't code it, my brother did.) |
In response to KirbyRules
|
|
Eum, instead of the if(O.loc==usr.contents), use
mob/verb/Get() |
In response to Mysame
|
|
Mysame wrote:
Eum, instead of the if(O.loc==usr.contents), use > mob/verb/Get() You mean like this? mob/verb I don't want to do that. Why would I want to get an object that's already in my inventory? Hmm... Could I do something like: mob/verb |
In response to KirbyRules
|
|
Well basically you would want to have sub objects derived from obj.
obj Then you would just check it's type. if(istype(O,/obj/nongettables/)) Using istype() is very helpful. Look it up in the F1 Reference and read up on it. Any questions feel free to post them. -Doh EDIT: Fixed my istype() error. |
In response to KirbyRules
|
|
Who's your brother? Anyway, instead of having a verb for the mob, have a verb for the object.
obj/Weapon/verb/Get() |
In response to CaptFalcon33035
|
|
CaptFalcon33035 wrote:
Who's your brother? My brother is XKirby2. XxDohxX wrote: Using istype() is very helpful. Look it up in the F1 Reference and read up on it. Any questions feel free to post them. Uuuh...When I use istype("typepath"), it says it's an unknown variable type. Anyway, I did the nongetables thing but instead of using istype() i just did this: mob/verb |
In response to KirbyRules
|
|
Thats because you need to use if(istype(O,/obj/nongettables/)) . Sorry about the messup.
-Doh |
In response to XxDohxX
|
|
Ok...I tryed this:
obj/verb But when I try getting a "nongettable" obj, it puts it in my inventory. Then I tryed this: obj/verb/Get() But I get an error saying "O.loc:undefined var". |
In response to KirbyRules
|
|
KirbyRules wrote:
Ok...I tryed this: obj/verb But when I try getting a "nongettable" obj, it puts it in my inventory. First of all, your doing this slighly wrong since you've changed the verb to an object verb. All you need is Get() since you've defined set src in oview(1). Then, when needed to refer to the object, just use src. Next, you are using istype() a little wrong. istype() checks the first argument to see if it is the type of the second argument. So after all these changes you should come up with something like this: obj/verb If you have any questions let me know. -Doh |
In response to XxDohxX
|
|
Thanks!
|
Not sure if that's what you mean, please be more specific.
-Doh