It's a side scroller and I want to know how to make an enemy walk right until it hits something then walk left, and when it hits a player it takes life off them.
That's all that needs said I think
--Ray
ID:261663
![]() Dec 15 2002, 3:19 am
|
|
Well, i would love to help you and try make the code now, but off my head i doubt i could doit at the moment..
At least now you have the idea, you could try pursuade or hope that someone comes along and writes one. Sorry Maz |
mob
Walker dir = EAST New() while(src) step(src,src.dir) sleep(5) Bump(atom/A) if(ismob(A)) var/mob/M = A M.hp -= sqrt(2) src.dir = turn(src.dir,180) |
Anyhow, you would need to make a looping proc that would first check if there is a turf that is dense infront of it, or one that is not dense to the front and down one, if neither then you would move it forwards one tile. if there is a dense block infront of it you need to set the direction to the other way, and do the same thing for that.