Your right. I had changed the name of Tomb to something more specific (Tomb_of_SoAndSo) and didn't bother changing the rest. Thanks.
-Dagolar
1
2
In response to Theodis
|
|
In response to Dagolar
|
|
Dagolar wrote:
Your right. I had changed the name of Tomb to something more specific (Tomb_of_SoAndSo) and didn't bother changing the rest. Thanks. Anyway a better way of handling the situtation would be to use object oriented programming to your advantage and do something like. obj This way you can easily add look messaged to all your objects. And if you don't want an object to have a look message just leave the variable as "". |
In response to Theodis
|
|
That's perfect. Thank you very much.
-Dagolar |
In response to Dagolar
|
|
I used the following code:
client Center() var/turf/T var/obj/O T = get_step(mob,mob.dir) if(T) for(O in T) O.NPCcom() O.NPCinn1() O.NPCinn2() Now, NPCinn1 and NPCinn2 are two different verbs, differently defined and so forth. Now, when I center on an object that has the NPCinn1 verb attached to it, it also runs the NPCinn2 verb, even though it's not attached. Why is this happening? -Dagolar |
In response to Dagolar
|
|
Dagolar wrote:
I used the following code: If it's letting you compile with that code then you have NPCinn2 defined for all objs so it is attached. The best way to handle this situtation is to rework the code a bit to let the Center() key handle more cases. obj |
In response to Theodis
|
|
client
Center() var/turf/T var/obj/O T = get_step(mob,mob.dir) if(T) for(O in T) O.NPCcom() O.NPCinn1() O.NPCinn2() THIS is what the code looks like... [;\ -Dagolar |
In response to Dagolar
|
|
client What's wrong with it :P? |
In response to Theodis
|
|
Same problem as before:
Now, NPCinn1 and NPCinn2 are two different verbs, differently defined and so forth. Now, when I center on an object that has the NPCinn1 verb attached to it, it also runs the NPCinn2 verb, even though it's not attached. Why is this happening? When I showed it to you before, O.NPCinn2 was tabbed far to the right. It's supposed look just like I showed the second time under "New Problem". -Dagolar |
In response to Theodis
|
|
In response to Dagolar
|
|
Now, NPCinn1 and NPCinn2 are two different verbs, differently defined and so forth. Now, when I center on an object that has the NPCinn1 verb attached to it, it also runs the NPCinn2 verb, even though it's not attached. Why is this happening? What do you mean attached? If you defined each of them under two different objects you would get a compiler error and have nothing run at all. So from what you showed I can't really figure what's going on. You need to show where your verbs are defined and how they're defined. |
1
2
Worked good on my side when I tested it. The only thing I could think of to cause these errors is if you changed
obj
Tomb
to someething else which would make O have an undefined type.