ID:175243
 
Hey ive been working on a new game and a I want a NPC to talk. This is my code : 
<dm>
turf/npc
icon='npc.dmi'
density=1
verb
Talk()
set src in oview(1)
usr << alert("hello")

This seems to work out fine. I place the icon of the little guy on the map and then when I test the game, the little guy is there and when im next to him I can talk to him and the little screen comes on saying the text. The problem is, when I try to make another NPC that says something else, I only get 1 NPC. Here is my total code :
turf/npc
icon='npc.dmi'
density=1
verb
Talk()
set src in oview(1)
usr << alert("hello")

turf/npc
icon='npc2.dmi'
density=1
verb
talk()
set src in oview(1)
usr << alert("hi")

There aren't any errors, but when I went to place the 2 npcs on the map, only one was under the turfs thingy. Could some one please help me? I would really appreciate it :)

~starwarspower
</<>
You are repeating NPC.I also would recommend using mob or obj for NPC.As for your problem rename the second npc to npc2