maxarturo Posted February 18, 2020 Share Posted February 18, 2020 (edited) This is an unconventional approach. - registerForAnimationEvent - OnAnimationEvent - SendAnimationEvent - wait x sec for the npc to rise the shield - cast on him a freeze spell with none of the freeze visual FX (blank FXs - casting the spell from the script and not making the player cast the spell), just to keep him in place for 2 sec. - do what you need with him from here... Edited February 18, 2020 by maxarturo Link to comment Share on other sites More sharing options...
NexusComa Posted February 19, 2020 Share Posted February 19, 2020 You could make them be friendly. That would stop the attack. Link to comment Share on other sites More sharing options...
myav Posted February 19, 2020 Author Share Posted February 19, 2020 (edited) maxarturo, can you give me more details?1. Which animation to register and which animation to send? 2. How to create freeze spell? I didn't find freeze variant in the Magic Effect > Effect Archetype *if to use paralysis - NPC fall on the ground and ignore all block commands*if to use template: FreezeSlowEffect, this only slow movement speed, but dont freeze the character*if to use stagger (even with none Visual FX) NPC play stagger animation and ignore block too NexusComa, during combat AI ignore faction changes and relation changes while CombatTarget != none. And no commands that to reset it, except StopCombat. But if to stop combat => AI will hide weapons, and without weapons - ignore all block commands. If you know THE WAY how to make friendly NPC without stop combat - pls write, and i'll test blocking Edited February 19, 2020 by myav Link to comment Share on other sites More sharing options...
maxarturo Posted February 19, 2020 Share Posted February 19, 2020 "1. Which animation to register and which animation to send?" This was just an idea of how you could make such a thing work. I don't actually know what you are trying to do and i'm making my proposals based on the limited info you have provided. "2. How to create freeze spell? I didn't find freeze variant in the Magic Effect > Effect Archetype" I didn't say to make a 'freeze spell', but to mimic its effect. You will need to start digging deeper into this, start by studying how the "Wall Of Frost" spell works, the spell has two effects in it that influence the npc's movement. Slow : SpeedMult Deep Freeze Paralysis The "Slow : SpeedMult" can work if you just need 2 sec for the npc to stay in one pose. There are also other spells that affect SpeedMult, i just picked the first one that came to mind. * Sometimes you need to find a workaround for your issue, and that workaround my need its own workaround. * If all your hope lies in doing this just by scripting, then you won't get anywhere... something like this needs outside the box thinking. Link to comment Share on other sites More sharing options...
NexusComa Posted February 19, 2020 Share Posted February 19, 2020 I used something like that once when I made an arena. But it was the other way around. Friendly till I wanted them to fight. Link to comment Share on other sites More sharing options...
myav Posted February 21, 2020 Author Share Posted February 21, 2020 (edited) maxarturo, I have written before: That "under paralysis" - npc ignore block commands (( and fall on the ground. During testing, template (MagicEffect) was: PerkDeepFreezeParalysis (with cleared: sound and visual) Edited February 21, 2020 by myav Link to comment Share on other sites More sharing options...
myav Posted February 23, 2020 Author Share Posted February 23, 2020 (edited) testing continues... NPC with maces/axes (with two-handed versions too) listen to the next command: HoldBlock_Allias.ForceRefTo(selfactor); HoldBlock_Allias => empty allias with empty package where is combat style with 100% defense Utility.Wait(0.25) selfactor.EvaluatePackage() if selfactor.getAnimationVariablebool("IsAttacking") Debug.SendAnimationEvent(selfactor as objectreference, "attackStop") endif Debug.SendAnimationEvent(selfactor as objectreference, "blockStart") Utility.Wait(0.5) Debug.SendAnimationEvent(selfactor as objectreference, "blockStart") Utility.Wait(0.5) Debug.SendAnimationEvent(selfactor as objectreference, "blockStart") Utility.Wait(0.5) HoldBlock_Allias.Clear()so, i find the way how to hold block 2 seconds for 50% of the NPC types, and half of the problem is finished. But.. npc with daggers and swords - ignore all this and ignore block commands/animations (at close distance). So, left 50% of the problem :-P how to force these types of the enemies to block. Anybody know any short animation which can cancel attack animations? and will be possible for swords/knifes to force blocking with command: int i = 0 while i < 20 if selfactor.getAnimationVariablebool("IsAttacking") Debug.SendAnimationEvent(selfactor as objectreference, SHORT stop attack animation) endif if !selfactor.getAnimationVariablebool("IsBlocking") Debug.SendAnimationEvent(selfactor as objectreference, "blockStart") endif Utility.Wait(0.1) i += 1 endwhilei found only 1 working animation: "attackstop", But this animation is not short (( and very visible when it casts 20 times in a row, when cancel attacks. the next was tested too: * staggerStop - don't cancel attacks* to make NPC friendly - cancels combat and npc ignore block commands* to add to forcefullbodystagger faction - don't cancel launched attack* paralysis - down npc and it ignore block animations So, who can help with short cancel? animation or idle or other way Edited February 23, 2020 by myav Link to comment Share on other sites More sharing options...
Recommended Posts