Re:Me probably overlooking something obvious again

Gary Brown
15 Jun 2005, 23:46
Okay. I'm trying to set up my emote commands. i.e. they player types in for instance, "laugh" and everyone sees something like, "Boris, the fighter, doubles over in laughter." And Boris should see, "You double over in laughter."
I'm using qdk, so, forgive me, but I selected the bit for running a script for each object in the users current room. I'm checking to see if #quest.thing# = $name(%userid%)$. If it does, it's supposed to print the "You double over in laughter" bit. otherwise it's supposed to print the "Boris, the fighter doubles over in laughter.", bit. But it only prints the "Boris, the fighter doubles over in laughter.", bit to everyone, including Boris.
Can anybody see what I'm missing. I appreciate the help.

Gary

francisstokes
16 Jun 2005, 15:31
not to crontradict what your saying, buts whats wrong with everyone seeing boris doubles over in laughter?

im not to good with multiplayer games so i cant answer your question.

paul_one
16 Jun 2005, 17:58
Why should Boris see "Boris doubles over in laughter"?

I take it you're using the "msgto <#quest.thing#; $name(%userid%)$ doubles...>" and "msgto <%userid%; You double...>" commands INSTEAD of the "msg <>"... As msg <> is to the whole room.

You should also check to see if the object has the property "player".

I wouldn't know any other errors - sorry.

Gary Brown
16 Jun 2005, 18:12
Thanks Tron. That must be it. I'm not using msg to. mia culpa.
And yeah, If Boris sees "Boris doubles over with laughter", then he starts to feel like Bob Dole refering to himself in 3rd person all the time. lol

Gary

francisstokes
16 Jun 2005, 19:10
francistokes said:

not to crontradict what your saying



I was only suggesting.

MaDbRiT
16 Jun 2005, 20:13
Gary

Multi-player Quest isn't really my thing so I have only a basic working knowledge of how it varies from single-player. However here's a very small demo that produces the effect you want relatively easily.

'laughing demo

define game <Laugh>
asl-version <350>
gametype multiplayer
start <startroom>
game version <0.01>
game author <Al Bampton (MaDbRiT)>
startscript {
msg <This is a simple demo only.>
}

player startscript {
msg <Welcome $name(%userid%)$!>
}
command <laugh> do <laughing>
end define

define room <startroom>
look <Seems a reasonable place to start...>
prefix <the>
end define

define procedure <laughing>
msg <You double up laughing, for no apparent reason.>
for each object in <#quest.currentroom[userid]#> {
if property <#quest.thing#; netplayer> and (#quest.thing# <> player%userid%) then {
msgto <#quest.thing#; |b$name(%userid%)$|xb doubles up laughing, for no apparent reason.>
}
}
end define


You should be able to cut n paste the code above (be careful of forum adding line wraps!) and have a working example to start from.

Hope it helps

Al (maDbRiT)

Gary Brown
17 Jun 2005, 15:23
Thanks for the code dude.

Francis, I didn't mean to offend. I was just making a joke. Sorry. I can't help it. If I can find any reason to rag on Bob Dole, (or Jerry Faldwell, or Ronald Reagan, or any of the Bush family, and maybe 3 or 4 thousand other public figures) I take it. lol

Gary