ID:269605
 
I help making the pc mob take damage in an rpg. I can make him take damage but only by clicking on the verb defend, anyone got suggestions?
Cmon plz i need the help, i'm new and the help that comes package isnt very new user friendly.
L0rd Vagn3r wrote:
I help making the pc mob take damage in an rpg. I can make him take damage but only by clicking on the verb defend, anyone got suggestions?

I assume you mean you want an enemy, after attacking the player, have the player recieve damage.

This, is very simple.

var/mob/enemy/E
var/damage=round(usr.def-E.def)
usr.hp-=damage


Basically, just subract an amount from the usr's HP.