ID:264006
 
Code:
mob
Story

Pidgey
icon = 'Pidgey.dmi'
name = "Pidgey"
hp = 200
strength = 15
var/mob/Pokemon/P
New()
. = ..()
spawn()
move()
proc/move()
while(src)
var/player_found = 0
for(P in oview(8,src))
step_towards(src,P)
player_found = 1
break
if(player_found != 1)
step_rand(src)
sleep(10)
sleep(5)

Bump(mob/M)
if(istype(M,/mob/Pokemon))
Attack2(M)
proc/Attack2(mob/M)
var/damage = rand(1,strength)
M.hp -= damage
M <<"You are being attacked by [src]!"
src.exp += rand(5,10)
M.UserDcheck(src)


Problem description:for some reason the AI isn't attacking and isn't moving at all, it just stands there doing nothing, any way to fix this?

i could be really wrong, but in step_twoards(src,P) isnt it telling Pidgey to step twards P, witch is defined as Pokemon?????
In response to RanEsu
Yes, but whenever im playing as the pokemon pidgey doesn't step towards it, and the path is perfect, I was playing as a pokemon which is mob/Pokemon/Charmeleon.
If nothing is happening then Move() isn't getting called, or it's crashing. Nothing you've posted here would cause that, however you might've overridden New() somewhere else without calling ..(), which would cause this.
In response to Garthor
Look at this, can you tell me if this is overriding it?

    New()
if (base_autoload_character)
base_ChooseCharacter()
base_Initialize()
return
return ..()
In response to Element Hero creator
            return


That. Right there. Remove it.