Jump to content

Scripted Critical Hit


krigulv

Recommended Posts

I've been looking around for this, but I haven't been able to find a solution.

Is there a way to get a weapon to critical hit via scripting? I want it to have a 0 chance of critical hitting during normal play, but under certain conditions, I want the script to make it perform a critical hit.

Anyone know of a way?

Link to comment
Share on other sites

I know of no reliable way to make a weapon do a critical hit directly. Your only option is to emulate it - that is, use a script to apply the critical effects.

 

Attach this script to the weapon:

scn	EmulatedCriticalHitScript

ref	rActor
ref	rTarget

begin OnEquip

	set rActor to GetContainer

end

begin OnFire

	if [Conditions are met]
		set rTarget to rActor.GetCombatTarget
		if rTarget
			[Do stuff on the target, like DamageAV, AddSpell, etc.]
		endif
	endif

end

Note that I'm not certain whether GetCombatTarget is reliable when called on an actor other than the player.

Link to comment
Share on other sites

  • 5 months later...

What about GetLastHitCritical dose that not check for a critical hit you can apply things to?

 

Sorry if I am posting out of turn but I am researching how to do a scripted CIOS script that fires off on critical hit since I am having trouble getting all the stuff to work through critical hit that works fine though object effect.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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