I want to make my SNPC can melee attack but I don't know how to do that. I know I must set a schedule; Sequence, task and other...
But i cant make it deal damage to player! Please help me!
You will need to use functions like Entity:TakeDamage to make it deal damage.
ok thanks but how i can define a distance?
entity:GetPos():Distance( otherentity:GetPos() ) , check if the distance is lower than something and if it is, deal the damage, if you don't know which distance to set, firstly try to print the value using console command "lua_run Entity(1):GetEyeTrace().Entity:Distance( Entity(1):GetPos() )" and see what value is the best.
Sorry, you need to Log In to post a reply to this thread.