by ashenk69 » Thu Aug 09, 2012 19:03
Take a look in doc/lua_api that'll contain most of the things you can do with modding. The first step to cause damage is to get the player you want to cause damage to. You could get that through a proximity check, a punch event, or getting the player specifically by name. There are also other ways but those were just a few. Then from there it is easy. The player is an Object Reference and there is a function set_hp(hp) where you could simulate damage.