ID:150147
 
I have code set up so when a user performs an action, if she doesn't respond, then the mom walks to the user. The problem I'm having is when the mom Bumps the user, nothing happens.
mob
mom
Bump(atom/M)
if(M == usr)
usr.score = 0
usr.cash = 0
End_Game()
else
return
Maybe this would work better:

mob
mom
Bump(atom/M)
if(M.client)
M:score = 0
M:cash = 0
End_Game()
else
return
In response to Cinnom
It says "error:M.client:bad var"
In response to Evilkevkev
Because using atom in Bump() means anything dense, only mobs can have a client so try mob/M and not atom/M.
Try this man



mob
mom
Bump(M as mob)
if(ismob(M))
M:score = 0
M:cash = 0
M:End_Game()
else
return
In response to Nadrew
Ok I switched atom to mob but when "Mom" bumps into the usr, nothing happens.
In response to Evilkevkev
try the one i added under your main post
In response to SonVegitto
That didn't work either. I just decided to have the mom appear on top of you to "catch" you. It's much simpler to code and works just as well.