1
2
ID:158132
Oct 23 2009, 11:42 am
|
|
How would someone make it to where people who can't see invisible mobs unable to see what invisible people say in their say verb?
|
Oct 23 2009, 1:06 pm
|
|
All can be done using variables, or by searching the path type and excluding it from a list. Depends how your invisible mob's work.
|
mob/verb/talk(msg as text) With this the message along with the user's name in bold comes to all people who aren't completely visible. To people who are completely visible is a blank space of nothing. Edit: mob/verb/talk(msg as text) There. The last one made it to where if the USER'S invisibility = 0 there message came out as nothing. This one makes it to where if your completely visible you can't see messages. |
In response to Speedro
|
|
An example, if you will. I'm terribly sorry, i'm very rusty. I haven't been on BYOND since I was 12. I am now 16.
|
In response to Kokomo0020
|
|
Kokomo0020 wrote:
> mob/verb/talk(msg as text) With this the message along with the user's name in bold comes to all people who aren't completely visible. To people who are completely visible is a blank space of nothing. > mob/verb/talk(msg as text) There. The last one made it to where if the USER'S invisibility = 0 there message came out as nothing. mob/verb/talk(msg as text) This is probably what you meant. The way you made it, the talker, and everyone in the talker's view, would first see the talker's message normally, and then, in case the talker has no invisibility at all, he alone would see an extra, blank message. And you do realize that in a mob verbs like these, src == usr, do you? |
In response to Nielz
|
|
I tried your method Nielz, and it makes the Mob repeat what it says, 2-3 times in a row. Help here?
|
In response to Xorbah
|
|
It does? That's odd. Ah well, you might as well go with Garthor's method: http://www.byond.com/developer/forum/?id=724212
That's basically the shortest and most simple way of sending a message to everyone who can see the talker. |
In response to Nielz
|
|
No, you don't understand. I want to make a system to where if you're invisible, people who cannot see the invisible cannot hear you. If they can see you, the message appears. Otherwise, it doesn't. Also, I want to make it to where the invisible people can still see the visible people's messages.
usr.spamcheck() That's what I have so far. EDIT: I don't think Garthor's Method will do that. |
In response to Xorbah
|
|
Xorbah wrote:
No, you don't understand. Have you considered taking thirty seconds to try my suggestion? |
In response to Garthor
|
|
All your method says is Viewers (src) << Message. What is that supposed to mean?
|
In response to Xorbah
|
|
... did you even looked up what viewers() is in the DM Reference? (hint: it is related to view() but from a different perspective... heh, that was like a pun!)
Try it, it works as how you want it. |
In response to GhostAnime
|
|
Where might I find the DM reference?
|
In response to Xorbah
|
|
Xorbah wrote:
No, you don't understand. I want to make a system to where if you're invisible, people who cannot see the invisible cannot hear you. If they can see you, the message appears. Otherwise, it doesn't. Also, I want to make it to where the invisible people can still see the visible people's messages. I do understand, you're trying to make an effect in the like of "only ghosts can hear ghosts but the ghosts do hear the living", right? That's exactly what Garthor's tiny code snippet does. All you need to make sure is that the invisible person's see_invisible var is set to higher than their own invisibility var, so invisible people can still see themselves. Look up the viewers() proc in the DM reference. Anyway, you might want to go with this setting to make Garthors's method work the way you want. invisible people: set their invisibility var to 100 set their see_invisible var to 101 visible people: set their invisibility var to 50 set their see_invisible var to 51 Using this invisibility/see_invisible setting, Garthor's method will do exactly what you want. |
In response to Xorbah
|
|
In response to Nielz
|
|
Lol, this is gonna sound funny, but I pressed F1 and it brought up the Mozilla Firefox page.
|
In response to Xorbah
|
|
Hit F1 inside Dream Maker, silly, and if in any case you've overridden F1 by something else, "Help" -> "Help On..."
|
In response to Garthor
|
|
How in the world do I set it up? I've tried, yes, Garthor! But it still comes out as double messages.
|
In response to Xorbah
|
|
If it's coming out as double messages, then delete the code where you're sending one of those messages.
|
In response to Garthor
|
|
It's actually coming out as triple-quadruple. And double when there's only 2 mobs in view.
if(usr.spamcheck == TRUE) |
1
2