ID:178960
Mar 13 2002, 7:32 am
|
|
have an NPC mob say something once, and then have dialogue for after he has finished?
|
Copyright © 2024 BYOND Software.
All rights reserved.
mob
npc
var
greeting = "Hello, my name is Enpeesee."
dialogue = "Have you any yams for my butter?"
list/hasgreeted = list()
verb
talk()
set src in oview() //Anyone who can see NPCs can talk to them.
if (hasgreeted.Find(usr)) //Have we met?
oview() << "[src] says to [usr], \"[dialogue]\"."
else
oview() << "[src] says to [usr], \"[greeting]\"."
If you wanted to make specific characters, you would define them under mob/npc, with just two lines of code.
mob
npc
broken_robot
greeting = "I am a broken robot."
dialogue = "Have you any robot glue?"
insane_frog
greeting = "I am an insane frog!"
dialogue = "If I'm so crazy, why are you talking to frogs?"