I couldn't think of a proper name for this post, but here's my question.
I have a verb called punch. When I punch it says "You punch [M]." What I'm asking is how would I make it view right. Like so if you punch a Goblin it will say "You punch the Goblin." but so if you punch a player it just says "You punch [M]."
ID:149442
Apr 28 2002, 2:44 pm
|
|
In response to Sariat
|
|
mob/verb
punch(M as mob) usr << "You punch [M]." oview()-M << "[src] punches [M]." M << "[src] punches you." (haven't added the damage and things like that yet) |
In response to Daemon5532
|
|
Daemon5532 wrote:
mob/verb |
In response to Sariat
|
|
Well, that didn't quite solve my problem, but I would have needed that in the future. What I was wanting was in this line:
usr << "You punch [M]." I want it to say different things for different mobs being attacked. As in if you were to punch a player named Bob in the game it would say: "You punch Bob." Where as if it were something like a Goblin or a Rat or something like that it would say: "You punch the Goblin." or "You punch the Rat." |
In response to Daemon5532
|
|
It should already do that...
|
In response to Sariat
|
|
Nope, sure doesn't.
|
In response to Daemon5532
|
|
It does. BYOND distinguishes between such names as proper and improper nouns, following the standard rule that impropers begin with lowercase letters and propers begin with capitals.
For example: mob/goblin mob/Lawrence_of_Arabia [goblin] punches [Lawrence_of_Arabia] would put out: "The goblin punches Lawrence of Arabia." [Lawrence_of_Arabia] punches [goblin] would put out: "Lawrence of Arabia punches the goblin." If you want to follow non-standard rules (like having an improper but capitalized name, just do this: mob Goblin name = "\improper Goblin" Harpy name = "\improper Harpy" Junior_Senator_from_the_State_of_Tennessee name = "\improper Junior Senator from the State of Tennessee" Now, you'll get output like "Lawrence of Arabia punches the Junior Senator from the State of Tennessee." |
In response to Lesbian Assassin
|
|
Yea, the sad thing is after I got off for the night last night, I started reading my Blue Book and came across the section that tells you how to do that, but thanks none the less.
|
mob/verb/punch(mob/M in oview(1))
usr << "you punch [M]"
view(usr)<< "[usr] punches [M]"