Jump to content

[LE] Getting followers to comment on a killmove


Recommended Posts

Hey everyone,
Is there a practical way to get follower NPCs to recognize and comment whenever a player has just finished a killmove on an NPC? I did some of my own research on the Creation Kit wiki and found this,

 

 

bool Function IsInKillMove() native

 

Which is a Function which basically tells whether or not a specific actor (in my case, PlayerRef) is in a killmove. However, since this would have to be fired on an event, I wasn't able to find anything related- at least going through all the existing Papyrus events for Skyrim: https://www.creationkit.com/index.php?title=Category:Events. I don't want to use RegisterForSingleUpdate as much as possible since I don't want to hog up Papyrus resources and performance unecessarily.

 

Any thoughts?

Link to comment
Share on other sites

I would say to make an ability with the condition IsInKillMove == 1, have it run on the player and put the ability on your follower, but that condition doesn't seem to exist in the CK. Instead you could use the condition IsAttacking == 1 on the ability, still run on the player. That way the effect starts whenever the player is attacking. Then attach a script to the abilities magic effect.

Scriptname KillMoveDetectScript extends ActiveMagicEffect 

;Put the condition IsAttacking == 1 on this spell abilities magic effect, have it run on the player.

Actor Property PlayerRef Auto

Event OnEffectStart(Actor akTarget, Actor akCaster)
    Utility.Wait(0.25) 
    If PlayerRef.IsInKillMove()
        ;do something
    Endif 
EndEvent
Link to comment
Share on other sites

Thanks, gotcha. I've been trying to research this online, but I can't seem to find anything: is it possible for a Papyrus script to check if a dialogue line is currently valid and/or on cooldown? Let's say I've conditioned a dialogue line to only be said every 12 in-game hours. If the countdown timer hasn't already been met, how do I make this killmove detect script not trigger the dialogue?

Edited by Martimius
Link to comment
Share on other sites

To add a cool down, I think you can just add a wait in the script:

 

Scriptname KillMoveDetectScript extends ActiveMagicEffect 


;Put the condition IsAttacking == 1 on this spell abilities magic effect, have it run on the player.


Actor Property PlayerRef Auto


Event OnEffectStart(Actor akTarget, Actor akCaster)
    Utility.Wait(0.25) 
    If PlayerRef.IsInKillMove()
        ;do something
        Utility.WaitGameTime(12)
    Endif 
EndEvent
Link to comment
Share on other sites

Thanks, gotcha. I've been trying to research this online, but I can't seem to find anything: is it possible for a Papyrus script to check if a dialogue line is currently valid and/or on cooldown? Let's say I've conditioned a dialogue line to only be said every 12 in-game hours. If the countdown timer hasn't already been met, how do I make this killmove detect script not trigger the dialogue?

 

One possibility is putting the exact same conditions on a magic effect, casting it on them, and then having a pingback from the ActiveMagicEffect if it worked. Bit clunky, though.

Link to comment
Share on other sites

in all honesty if you have the skill it is possible to do anything with code, but there is the kiss principle to consider, and these constant magic effects to check random things, though they work, also increase the likelihood of a call to desktop.

 

 

a lot of effort for little or no gain, if it for your personal use go for it, if you're thinking of publishing be reasonable and responsible.

 

don't.

 

facelight on followers is a good repeatable example that common knowledge in the community, player sneaks? game checks constant magic effect. game ctd. is turning off face light on followers when sneaking worth a crash?

 

NO.

 

@foamyesque: for theory I to do Doubly Linked List, I went why, when I can use an existing framework. (I am still cheeky bloke) Still had to do it, I can now make my own formlists, There was question i remember you asking? The answer is: it is a list it what it does. You can add to the beginning or the end without checking anything. It is just the head and the tail.

Link to comment
Share on other sites

in all honesty if you have the skill it is possible to do anything with code, but there is the kiss principle to consider, and these constant magic effects to check random things, though they work, also increase the likelihood of a call to desktop.

 

 

a lot of effort for little or no gain, if it for your personal use go for it, if you're thinking of publishing be reasonable and responsible.

.

Do you have an alternative then?

Link to comment
Share on other sites

 

To add a cool down, I think you can just add a wait in the script:

 

Scriptname KillMoveDetectScript extends ActiveMagicEffect 


;Put the condition IsAttacking == 1 on this spell abilities magic effect, have it run on the player.


Actor Property PlayerRef Auto


Event OnEffectStart(Actor akTarget, Actor akCaster)
    Utility.Wait(0.25) 
    If PlayerRef.IsInKillMove()
        ;do something
        Utility.WaitGameTime(12)
    Endif 
EndEvent

 

I did some testing on this, and while my quest init script does give the player the ability (I checked the console), the MGEF script isn't successfully firing. I put a debug notification for whenever the MGEF should fire, but it isn't appearing and the scene where my follower comments isn't starting.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...