Disabled Tool attack animation

Things that already exist in the current mod API
Post Reply
User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Disabled Tool attack animation

Post by L0771 »

Hi, I'm making a mod to add a lot of melee weapons, for this, i've disabled the melee attack:

Code: Select all

data.raw["character"]["character"].tool_attack_result = nil
It don't disable the attack animation, but don't run the event on entity damage on attack, the problem is the animation and the stop of movement.

Like the gif, the character stop when i have melee enemies
Image

I want to remove all the slow movement, I think it's a bug, because the tool attack is nil and damage event doesn't exists.

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: Disabled Tool attack animation

Post by posila »

Setting tool_attack_distance to 0 should disable it

Code: Select all

data.raw["character"]["character"].tool_attack_distance = 0 

User avatar
L0771
Filter Inserter
Filter Inserter
Posts: 516
Joined: Tue Jan 14, 2014 1:51 pm
Contact:

Re: Disabled Tool attack animation

Post by L0771 »

Thanks you a lot!

Post Reply

Return to “Already exists”