ID:266662
 
I've been wondering latley with this code
    Attack(mob/M in oview(1))
if (M.NPC==0)
spawn() PlayerAttack()
spawn() Levelup()
else
usr<<"<B><font color=white>You can't attack NPC's."


Would spawn be effective there or help in anyway?
Emperor Beld wrote:
I've been wondering latley with this code
    Attack(mob/M in oview(1))
if (M.NPC==0)
spawn() PlayerAttack()
spawn() Levelup()
else
usr<<"<B><font color=white>You can't attack NPC's."

Would spawn be effective there or help in anyway?

Depending on your battle system, yes, although you probably don't need both procs spawned out separately; you can probably spawn them together in a block--or better yet, move Levelup() to the end of PlayerAttack().

Here's the thing: Spawning probably won't do you any good if your battle system is based around just using the Attack verb over and over. If PlayerAttack() initiates battle, however, then spawning it out would make sense. (You'd want, however, to lock your mob somehow so other verbs couldn't be used until the battle was over.)

Lummox JR