ID:1499377
 
(See the best response by Koshigia.)
Problem description:

I wanted to write some code that means when you bumb into a player (and only a player) one of their variables and not mine changes so the die, but I can't find a way for another player to change someone elses variable or for their to be a check on Bump() that checks if its another player
Let us see your code so we can get a grasp of what you understand at the moment and we will go from there.
Best response
Hello, Neatht.

Well, you might first want to check and make sure it's a mob because mobs have a variable called client. The mob's client variable is set for players (not NPCs), so checking if that variable is true a good way to know if it's a player or not. Something along the lines of...

...
Bump(atom/Obstacle)
if(ismob(Obstacle) && Obstacle:client) //if it's a mob AND a player
Kill(Obstacle) //kill the player


Be warned that in this example Obstacle is not typeset to mob, so you must use the : when addressing it's client variable AFTER determining if it is a mob. If you don't feel comfortable doing that, there are some other ways to accomplish this.

...
Bump(atom/Obstacle)
if(ismob(Obstacle)) //if the obstacle is a mob
var/mob/M = Obstacle //readdress the obstacle as a mob
if(M.client) //check to see if this mob has a client
Kill(M) //then kill the player


or...

...
Bump(atom/Obstacle)
if(ismob(Obstacle) && isplayer(Obstacle)) //check to see if its a mob and a player
Kill(Obstacle) //kill it if so

proc/isplayer(mob/M)
if(M.client) return 1



*edit* Fixed mistake pointed out by Pirion. Sorry, I did some copying and pasting :P Also, this should go without saying, but this is not a complete "here-ya-go" code.
If you are using inheritance, you can do as below:

Bump(atom/Obstacle)
var/mob/player/P = Obstacle
if(istype(P))
P.Kill()



Koshigia: #3 doesn't define an M under bump. :)
In response to Pirion
Thanks Pirion :)
In response to Koshigia
how would I change a variable on them so their variable deaths changes by +1
Should be something like
mob/var 
Death=0


then after you Bump()
M.Death+=1