mob/Move()
for(var/mob/M in get_step(src,src.dir))
src.loc=locate(M)//Moves it on top of M
return
..()
Problem description:
Its for a player to walk over another player, but when a player walks on top of another player the screen goes black.....
ID:146331
![]() Jul 18 2005, 3:38 pm
|
|
Code:
mob/Move() Problem description: Its for a player to walk over another player, but when a player walks on top of another player the screen goes black..... |
![]() Jul 18 2005, 3:47 pm (Edited on Jul 18 2005, 3:52 pm)
|
|
no...it just automatically moves a player on top of another, try walking on top of a npc the (!M) only does it to players
|
nope, with the code out i cannot walk through walls, with it in its changing my density every time i try to walk through a wall
|
...well then i have no clue cause it clearly says Bump(mob/M) so unless you have mob walls something is wrong
|
if(!Enter(locate(M.x,M.y,M.z)))return This would never allow you to teleport ontop of M unless you or M has density set to zero. |
One: That return at the end is not needed.
Two: That would never work. The atom needs to be dense for you to bump it, but you cannot stand on top of it because you disable it to be 'walked on'. |
to me it seems he just combined our lines of code, i only had the return in there because i edited his and forgot to take it out
|
http://developer.byond.com/hub/Cheetoz/Demo
You should see that, it wont bump EITHER the wall or the player but then lets say you multi-key / get a friend, it will bump them without a problem |
Derekjeterisgod wrote:
Code: > mob/Move() Problem description: It would, since you're not using locate() correctly. locate(object) does not give you the object's location. That would be the loc var. Lummox JR |