ID:142694
 
Code:
mob/enemy
var/cursed = 0 // where its located
mob
priest
icon = 'base.dmi'
icon_state = "priest"
hp = 100
def = 0
New()
spawn() while(TRUE)
for(var/mob/enemy/M in oview(7,src))
var/obj/darkness/J = new(src.loc)
while(J && M in oview(7))
if(M.cursed == 0)
missile(J,src,M)
M.overlays+=image('base.dmi',"curse")
M.curse(M,1)
M.cursed = 1
sleep(10)
sleep(10)
sleep(10)
mpriest
icon = 'master.dmi'

mob/proc
curse(mob/M,dmg)
spawn for()
M.hp -= dmg
sleep(M.spd)

Problem description:
well the priest sends a "curse" onto the enemy but it doesn't shoot again until the mob is dead? could anyone point out why its not consistently shooting at mobs that aren't already cursed (M.cursed = 1)? Thank you for your help!
You never make it have turn it off.
So add a M.cursed=0 somewhere.
In response to Sokkiejjj
what?? that makes no since I want the mob to be cursed until it dies but the priest to keep shooting curses, the priest isn't the mob.
In response to Nategrant
Make the cursed variable turn zero when the mob dies.
In response to Sokkiejjj
dude you have no idea what your talking about.... if i did that all it would do is not shoot at dead mobs and guess what it doesn't do that anyways! please only post help if you know what your talking about.
In response to Nategrant
I might have sounded a bit mean but i am getting frustrated with this problem. if you want you can come online and see where the problem comes from in game, palace http://www.byond.com/games/Nategrant/Palace#online
                    while(J && M in oview(7))
if(M.cursed == 0)
missile(J,src,M)
M.overlays+=image('base.dmi',"curse")
M.curse(M,1)
M.cursed = 1
sleep(10)
sleep(10)


It doesn't shoot at other mobs because it stays in this loop until M leaves.

Also, that should be oview(7,src)
In response to Garthor
well how could I fix that then?
In response to Nategrant
Are you seriously reposting the same thing (and deleting your own post) repeatedly in an attempt to stealthily bump your thread?
In response to Garthor
only because you chose to ignore my question. Why won't you just answer it?
In response to Nategrant
Remember that nobody owes you anything and nobody has to answer your questions, and wait patiently. Your act of bumping is uncalled for (good catch by Garthor there) and you better not keep it.
At any case you've been quite answered already. It doesn't seem you want another explanation or a more detailed one or anything of that sort, or you'd have asked for it. Just asking how to fix the problem after the problem has been pointed out is quite... pointless.