mob
Vampire
Bump(mob/M)
..()
if(istype(M,/mob))
M.Bite()
Problem description:I cant make "if(istype(M,/obj)" but if I remove "(mob/M)" on bump the vampire cant bite!How I can make if(istype(M,/obj) and delete the obj? Also how I can make vampires respawn at a random location from 0 to 100 x?
Need help,please.
Then you'll need to typecast in each if statement. So you'll have
Then simply add an else if branch for your objects
As for respawning, look into the locate() proc and the rand() proc. You can find them in the reference, open up DM and press F1.