ID:150922
 
okay, these stat panels are confusing the hell out of me.

i have a stat pnael called Imm Commands. And I have verbs in it. I know how to set a verbs visibility, butI don't know how to hide/show the panel at will. Do I have to declare the panel first? I'm doing osmething liek this:
mob
player
invis()
set category="Imm Commands"
if(usr.imm==1)
if(src.visibility)
src.visibility=0
usr << "You can no longer be seen."
view() << "[usr] slowly fades from view."
else
src.visibility=1
usr << "You fade back into view."
view() << "[usr] slowly fades back into view."
else
usr << "You are not an immortal."

okay, I set the category as 'Imm Commands'. Imm Commands, doesn't exist so its gonna have to create it. wich it did. now how the heck do I control that panel? such as showing and hiding it. i'm so confused i can't even remember the other questions i had(for they were confusing me).

And a thing on verbs. i made a verb called 'talk' to talk to NPCs. I did what Lexy said, to make you onyl be able to do it on NPCs. and it worked. but when i click talk, a dialog pops up with all the mobs in view and you are asked to choose one.

how can i control who/what a verb will show up on(when you right click on them/it), and what range, while NOT popping up a dialog asking for the mob. i just need some example code and I will be set.

okay, well i'm outa here. thanks for your guys help so far.
I just covered how to do the statpanel under your verbs post in the General forum. However the way I did it will give you the dialog windows you wanted to avoid. Why is the popup undesirable?
In response to Shadowdarke
On 7/3/01 5:15 am Shadowdarke wrote:
I just covered how to do the statpanel under your verbs post in the General forum. However the way I did it will give you the dialog windows you wanted to avoid. Why is the popup undesirable?

Because it's including mobs that it shouldn't. Gavin, I've answered this elsewhere. Your problem is most likely that you're still giving your verb an argument of type mob, right? Arguments are those things in parantheses at the top of the verb. The way I told you to do it should have no arguments, usr is the person saying the thing and src is the person being said to.

mob/npc/verb/say()
set src in oview()

Unless your players are of the same type as your npcs, then there is no way this code will allow you to say to anything but npcs.
In response to LexyBitch
actually, Lexi, the usr is saying nothing at all. You click talk on an NPC, the NPC in turn(IF it has a set msg to say) will tell you, and anyone else within a view of 4, what its message is. So its imsply outputting the value of a varialbe ont he NPC. see what I'm saying?

the reason the pop-up dialog is undesirable, is because the way I am doing it is you right click on a NPC, and then lick on talk. therfore there is no need for the dialog. it seems upon waiting for an answer, i figured this out on my own.

the way it works, is when you click talk(on the stat panel, or if you type it), it will randomly choose an NPC within 1 view space of you. however, if you right click on an NPC and then lick talk, it will talk to THAT specific npc. so everything works out great that way. i think upon my confusion, I confused you guys. And i finally remember what i was conused on(besides the stat panels, and using them). it was SRC. i'll make a seperate post for that one.

thanks for your help.
In response to XgavinX
On 7/3/01 7:04 am XgavinX wrote:

the reason the pop-up dialog is undesirable, is because the way I am doing it is you right click on a NPC, and then lick on talk. therfore there is no need for the dialog. it seems upon waiting for an answer, i figured this out on my own.

Im sorry, I know its just mistyped... I do it all the time, but the image of a whole bunch of byond-ers(?) sitting around licking their monitors is just too funny.
In response to Flick
Im sorry, I know its just mistyped... I do it all the time, but the image of a whole bunch of byond-ers(?) sitting around licking their monitors is just too funny.

LMAO. i just re-read it and I see what you mean. LMAO, it is kinda funny. =P
In response to XgavinX
On 7/3/01 7:04 am XgavinX wrote:
actually, Lexi, the usr is saying nothing at all. You click talk on an NPC, the NPC in turn(IF it has a set msg to say) will tell you, and anyone else within a view of 4, what its message is. So its imsply outputting the value of a varialbe ont he NPC. see what I'm saying?

Yes, I see what you're saying. But if your verb is called say, or talk, or whatever, then the person performing the verb most certainly -is- SAYing or TALKing or whatever the verb is called. The performer of the verb is the user. I'm not talking about anything that goes on inside the game, mind you. I'm speaking in abstract terms. I could've just called the example verb "verb" and said that the user could "verb" NPCs and PCs alike. In this case, the name of the hypothetical verb is "say", so the PC "say"s to the NPC to produce whatever the desired effect is.

the reason the pop-up dialog is undesirable, is because the way I am doing it is you right click on a NPC, and then lick on talk. therfore there is no need for the dialog. it seems upon waiting for an answer, i figured this out on my own.

It seems like you did, but from what I've seen of your code, you haven't. If the pop-up was including PCs, the random mix will.
In response to LexyBitch
On 7/3/01 7:42 am LexyBitch wrote:
On 7/3/01 7:04 am XgavinX wrote:
actually, Lexi, the usr is saying nothing at all. You click talk on an NPC, the NPC in turn(IF it has a set msg to say) will tell you, and anyone else within a view of 4, what its message is. So its imsply outputting the value of a varialbe ont he NPC. see what I'm saying?

Yes, I see what you're saying. But if your verb is called say, or talk, or whatever, then the person performing the verb most certainly -is- SAYing or TALKing or whatever the verb is called. The performer of the verb is the user. I'm not talking about anything that goes on inside the game, mind you. I'm speaking in abstract terms. I could've just called the example verb "verb" and said that the user could "verb" NPCs and PCs alike. In this case, the name of the hypothetical verb is "say", so the PC "say"s to the NPC to produce whatever the desired effect is.

the reason the pop-up dialog is undesirable, is because the way I am doing it is you right click on a NPC, and then lick on talk. therfore there is no need for the dialog. it seems upon waiting for an answer, i figured this out on my own.

It seems like you did, but from what I've seen of your code, you haven't. If the pop-up was including PCs, the random mix will.

heh, okay so its not 100% perfect, still working a few things out. i tried what you said, by making the verb have no argument. but then you don't have access to the verb at all. it is defined under: mob/npc/verb/talk(). and so far when i execute the command it always chooses the NPC, and not the player. -shrug- perhaps i'll figure it out later.
In response to XgavinX

heh, okay so its not 100% perfect, still working a few things out. i tried what you said, by making the verb have no argument. but then you don't have access to the verb at all. it is defined under: mob/npc/verb/talk().

Did you set src in oview()? If you did, you will have access to the verb... but only when there's a valid target for it (this is how verbs in BYOND work, and one reason why it's desirable to define verbs like get, drop, open, close, etc. inside of their target... they don't clutter up the list when there's no valid target, and you won't get bunches of invalid verbs in your mouse menu when you right-click on something, either.)

and so far when i execute the command it always chooses the NPC, and not the player. -shrug- perhaps i'll figure it out later.

Are you standing next to an NPC and a player? I mean another player, not the one you're using to test. If you're setting the src/target=oview() (as opposed to view()), it will never choose the person using the verb.
In response to LexyBitch
On 7/4/01 7:54 am LexyBitch wrote:
heh, okay so its not 100% perfect, still working a few things out. i tried what you said, by making the verb have no argument. but then you don't have access to the verb at all. it is defined under: mob/npc/verb/talk().

Did you set src in oview()? If you did, you will have access to the verb... but only when there's a valid target for it (this is how verbs in BYOND work, and one reason why it's desirable to define verbs like get, drop, open, close, etc. inside of their target... they don't clutter up the list when there's no valid target, and you won't get bunches of invalid verbs in your mouse menu when you right-click on something, either.)

and so far when i execute the command it always chooses the NPC, and not the player. -shrug- perhaps i'll figure it out later.

Are you standing next to an NPC and a player? I mean another player, not the one you're using to test. If you're setting the src/target=oview() (as opposed to view()), it will never choose the person using the verb.

no, i can't test with more thanone char cuz when i try to login with another instance of the client, it says my key has expired and i must connect to the net and renew it. however, when i do this, and use the new key, it still says the same thing. so testing is lsightly limited.

i'll try what you said and see if i can get it to work.
In response to XgavinX
no, i can't test with more thanone char cuz when i try to login with another instance of the client, it says my key has expired and i must connect to the net and renew it. however, when i do this, and use the new key, it still says the same thing. so testing is lsightly limited.

Well, you can't connect with the same key. You need two different keys to work.

Me, I don't even test my multiplayer. I just run my binary inside my brain. =)
In response to Spuzzum
On 7/4/01 9:02 pm Spuzzum wrote:
no, i can't test with more thanone char cuz when i try to login with another instance of the client, it says my key has expired and i must connect to the net and renew it. however, when i do this, and use the new key, it still says the same thing. so testing is lsightly limited.

Well, you can't connect with the same key. You need two different keys to work.

Me, I don't even test my multiplayer. I just run my binary inside my brain. =)

well, i did try using a different key. its eems to work now that i have upgraded. =P