Jump to content

Recommended Posts

Posted

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?

Posted

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.

Posted

Was afraid of that. Was hoping there was just some critical hit command I was missing.

Well, thank you for your help again, jazzisparis

  • 5 months later...
Posted

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.

  • Recently Browsing   0 members

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