ID:174728
 
I'm making my first game, and I just put in all the monsters. I tested it out, but none of the monsters moved. I could attack and kill them, but they wouldn't move or attack me. Could someone give me a code to make them living?
I would suggest you giving us your code, then we can help you fix it/implement whatever you need into it.
In response to SSChicken
Here is my code for the monster:

mob
Chicken
icon = 'chicken.dmi'
hp = 5
str = 5
def = 2
I know that that's not enough, I'm just not sure what to add.
In response to Monkiesmania
I figured out how to thanks to another topic, but the they moved uber fast. This is the code I have for it now:

mob
Chicken
icon = 'chicken.dmi'
hp = 5
str = 5
def = 2
wander = 1
mob
var/wander
New()
if(wander) walk_rand(src)
..()

How do I make the monster slow down?
In response to Monkiesmania
It should go more like this:

mob
Chicken
New()
while(src.hp>0)
step_rand(src)
sleep(3)
In response to SSChicken
Thank you, that helped a lot. But now after they die and come back, they don't move anymore. Here is my code:

mob
Chicken
icon = 'chicken.dmi'
hp = 5
str = 5
def = 2
New()
while(src.hp>0)
step_rand(src)
sleep(5)

mob
proc
deathcheck()
if(src.hp <= 0)
world << "[src] has been killed by [usr]!"
src.icon_state = "dead"
usr.sxp += 10
usr.dxp += 10
usr:levelcheck()
sleep(100)
src.icon_state = ""
src.hp = 5

Could you tell me whats going wrong there? Also how do I make them attack? Oh ya, can you tell me how to make them stay inside a certain area too? I hope thats not to much to ask, but it would really help.