• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[TFS 1.1] The best way to damage player

blisher

New Member
Joined
Jan 16, 2016
Messages
13
Reaction score
0
As in thread, what is the best way to achieve this? I want to hit player once with ordinary physical damage. Removing hp, creating magic effect and bloodspot is a bit unconvenient. I haven't found method like damagePlayer(...). Is there such one?
 
bloodspot is a bit unconvenient
The problem with the function is that PHYSICAL damage what takes hp WILL put the bloodspot under the player.
Also there seems to no way to remove the default magic effects.

Maybe there is good way to do what you want with:
Combat() and combat:setParameter(key, value)

However I haven't done a single script with these functions.

What you could also do is make the custom damage system:
Make function damage() (Give parameters you want)
Then let it run trough formulas (armor, resistances, other effects)
If at the end of formulas some damage was passed over, compare player current health and the damage what passed over.
Finish up like this: player:addHealth(-damage)
Give effects if you want or items if you want something to appear under player.
 
Back
Top