ID:149749
 
where did it go i cant find it so i guess i will repost. Ok i have a dm for my charracter setup and i am giving them their own individual attacks but i have set up a battle system in a different dm. So when i try to put the attack verb to the character it says duplicate definition. How do i call upon the attack verb that i already declared and initialized in my battle system.dm.
Ex.

mob/ninja
mouse_over_pointer = MOUSE_ACTIVE_POINTER
icon='ninja.dmi'
hp = 200
attack = 3
defense = 4
verb
Attack(mob/M as mob)<<<<<<<<<Here is prob already used in Battle system.dm
set category = "Attack"
set hidden = 1
if(M == null)
return 0
if(src == null)
return 0
if(M.typechar == "monster")
if(usr.attack - M.defense > 0)
M.hp -= usr.attack - M.defense
usr.durabilitycheck()
view() << "You attack [M.name]"
M.DeathCheck()
else
usr << "You arent powerful enough to damage [M.name]!"
else
usr << "You cant attack that!!"</<</<here></<<<<<&l t;<</<<<<<<</<<</<< ;<<<</<<<<</<<<
I think you posted it in Bug Report, not in code problems. By the way, bug report is for bugs in byond, not in your code.

The problem is that you only need to define a verb/proc once like this:

mob
verb //just define it as a verb here
Do_Stuff() //this will work for all generic mobs
world << "I'm a mob!"
stick
Do_Stuff() //all sticks will use this instead of the generic mob version
world << "I'm a stick!"
blue_stick
Do_Stuff() //all blue sticks will use this instead of generic mob and stick versions
world << "I'm a blue stick!"