Change NPC specific sequence weight

Model have few animations of melee attacks regitred as

activity "ACT_MELEE_ATTACK1" 1

But i need for example changing their weight on event in lua (for example: some animations weight become 0, after another event again 1). Is it possible?

I think this may be possible with

Entity:SelectWeightedSequence and

Entity:SetLayerWeight… but I have no clue how they work, so I’m probably very wrong

I need to change sequence weight not get it with Entity:SelectWeightedSequence. And Entity:SetLayerWeight work with layers and set weight for layer(for example if you use more than 1 layer). To use it need to create layer…i tested layers it is not good solution.

I tryed layers but its really bad, because bot have melee lunge animations. In this animations he move and it good work with schedule, but layered sequence and gestured sequence not use moving. I also want to try SetSequence but nps instantly stop this animation (look like he play it 0.1 second and stops). Also when entity registred as enemy for this npc die he instantly stop attack animation :s: