Ok, I am trying to make it so the icon for the player mob is shown to the player only, not to other players (like for sneaking) and when a specific variable is set the player is shown to the other players. I see only one way of doing this, by screen images, but I do not know how to make the icon move when the player is moving

Is there a better/easier way of doing this?



X = random turfs ect
P = Player
0 = player, but not visible to this player, only to theirself
What you want are the invisibility and the see_invisible variables.
In response to Andre-g1
Andre-g1 wrote:
What you want are the invisibility and the see_invisible variables.

Actually, since he wants every player to be able to see herself, he might go for a mixture of invisibility and the sighs bitflags(SEE_SELF) to achieve the described desired effect.

KingCold999 wrote:
Ok, I am trying to make it so the icon for the player mob is shown to the player only, not to other players

In response to Schnitzelnagler
Thanks, I got the invisibility working. But how do I make it so these to players can move into the same space (without density=0 because that disrupts another proc.)
In response to Schnitzelnagler
Or an invisibility value of 101(same for see_invisible).
In response to KingCold999
Temporarily turn density to 0 and then turn it back ? Or check for a mob on the tile you're trying to move, if it exists, set their loc directly.
In response to KingCold999
Modify Enter() to allow a player to enter even if someone is there. You will need to do a little work to get this working properly, but it's the only way to properly achieve what you want to do.
In response to Jeff8500
u could try something like this, idk if it works, i just coded it quick:

var/isinvisible = 0
src.loc = a.loc

just set the variable isinvisible to 1 when the player becomes invisible like that
In response to Flame48
First of all, invisibility is built in, rendering your isinvisible var useless (you didn't even use it, though!). Second of all, that is pretty much as non robust as you can get. What if he's still supposed to drown when he enters water even when he's invisible? He should do what I said, which is override turf/Enter() to allow him into the turf even if a mob is there.

Don't help people if you don't know much about DM yet.
In response to Jeff8500
i know lots about dm....thats the way i would do it....well...i would edit the code alot to get it so it would work for certain things....but i guess ur right in this case enter would work better
In response to Jeff8500
Yeah, for these kinds of things IIRC you pretty much have to manually replicate the default Enter() in your code*, at least partially, and that is when taking some shortcuts. Maybe DM should really have an additional hook to do this that determines if a given atom blocks another from movement, as in atom/movable/IsBlockedBy(atom/obstacle) by returning 1 or 0. Then doing something like this would be a simple matter, without needing to softcode default movement processes.

*: Though, using the softcoded Move() proc posted by Lummox [link] as reference or even a base makes it a much shorter work.

It should be regardless noted to the OP that the concept of hiding players' existence from others or separating their existences (like having multiple 1on1 fights in the same arena, only the people are invisible to eachother and can't interact) is a wide concept hard to pull off completely in DM, and probably impossible in certain situations. You'd need to have this concept dominate your game's code by checking for it with all possible player interaction, such as area-effect stuff like explosions not affecting "separated" players, etc.
Though, for something kept merely to sneaking, this wouldn't bother you much at all, so I'm just rambling. =P Just keep in mind having code like this:
set src in range(4)
usr << "You see [src] ([src.level])"

... will alert players to other nearby players, even if they're not supposed to notice them, like being invisible, so it could render sneaking useless. Though for such a simple thing using view() instead will fix the issue.
what your wanting is something like this;

usr.sight |= SEE_SELF

to all others the wo/man is invisable, but can still be seen by him/herself