ID:144832
 
Code:
mob
Move()
if(usr.weight>=1)
usr.amt += usr.maxpowerlevel
usr.amt += usr.weight
usr.amt = (usr.amt * (rand(2,3)))
usr.maxpowerlevel += usr.amt
usr.amt = 0

..()


Problem description:When i move nothing happends, the amt var number never changes, its default is 10 so I know its the move var, can someone help me?

Your problem is that you are using usr in Move(), where usr is unacceptable. usr is not neccesarily the mob who is moving, but is the object that called the mob's movement proc. You have to rely on src to know who is moving. (src being the owner of the function that is being called)

Also, you should return ..() instead of just calling it, because Move() would return null regardless of whether or not the player successfully moved or not. (By default, Move() returns 1 when the object successfully moves)

mob/Move()
if(src.weight >= 1)
src.amt += src.maxpowerlevel
...
return ..()


~~> Unknown Person