Jump to content

GetLastHitCritical


Recommended Posts

I'm trying to have a perk only be activated if the players last hit was a critical one. Therefore I've planed to use the GetLastHitCritical condition.

 

 

 

 

 

 

But it isn't working.

 

 

 

www.creationkit.com says:

 

"GetLastHitCritical indicates whether the last time an actor was hit resulted in a critical strike."

 

Is it the player that registers the hit, or is it the enemy?

 

 

Where shall I put the GetLastHitCritical condition. In the perk owner tab or in the target tab?

 

 

grrr...

 

 

 

 

 

 

 

Link to comment
Share on other sites

From the description, it sounds like this applies to the target (enemy).

 

If you want to see when the player strikes a critical hit, the GetLastHitCritical should refer to the target.

 

(Mind you, I haven't tested this out in CK.)

Link to comment
Share on other sites

Hm, hm. Still no luck. I've tried several variations and still, no critical hits are noticed. I got the feeling that the GetLastHitCritical isn't usable. Has anyone ever successfully used this condition?

 

Is there any other way to detect a critical hit landed by the player?

Link to comment
Share on other sites

Well, the tricky part is that GetLastHitCritical is a condition function that can be applied for ReferenceAlias filtering. This isn't ever going to throw an event you can detect. And none of my searches came up with events that had this sort of information. GetLastHitCritical also appears to be a console command, unavailable to Papyrus.

 

What you would have to do is set up 2 quests. The first has a ReferenceAlias to the player. In it you use the SKSE function RegisterForActorAction to make the form get OnActorAction events for things like Swing Weapon. (Alternatively you could just use a RegisterForSingleUpdate loop without SKSE, but that sort of polling is terribly inefficient and you may miss events.) When the event is thrown, you Stop and Start the second quest, which has a ReferenceAlias for an actor set to Optional with the GetLastHitCritical condition function. If that alias populates, then it is likely that the player's weapon swing caused a critical hit on that NPC. I say likely, because it is not certain in situations with multiple combatants.

 

IMHO, this is a pretty messy and uncertain solution. Maybe we should step back and see what you are trying to accomplish overall, rather than how to accomplish it.

Link to comment
Share on other sites

Hm, hm... hmmm. Thanks for the efforts - much appreciated. I agree with the messy & uncertain part but very creative thinking man.

 

Hm. F***. Without detecting critical hits I can drop the hole idea, as I was planning to have different bonus variations especially for critical hits. Like: 10% chance that the target is paralyzed when critical hit was landed.

Edited by portbash
Link to comment
Share on other sites

If it helps, as I understand it, other mods that do special criticals such as Locational Damage do their own probability calculations. The game does provide access to critical hit percent chance. This may effectively double the number of criticals landed, but it might also get you closer to what you want.

Link to comment
Share on other sites

I liked the quest/alias idea so I tried it, but it doesn't find a match.

 

I also applied a constant ability spell on a test NPC with the GetLastHitCritical as spell condition - not working either.

 

 

Thx, but knowing the critical hit percent chance isn't helping.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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