Jump to content

Create a new h2h power


CryLoar

Recommended Posts

Hi everyone! I want to create a power (the ones you activate with the shout key) and i want to make that power a punching attack. I know that it is possible because of this old mod:

 

I want to create something really much simplier than that. First of all I don't want the slow-mo effect, neither damages that are stamina-related like in the original mod. I've found this body hook animation that could be good or the standard vanilla left punch, and i want add an effect, iIthink that it is the second step of the fus-ro-dah effect. So it is supposed to strike the enemy to the ground with a punch when i press the key, nothing more than that.

I have to create a script? Or is a simple operation from the creation kit? I really don't know where to start, the only things I have are the animations.

 

Thank you very much guys!

Link to comment
Share on other sites

HI CryLoar,

 

I am learning too... I would try to make a duplicate of the VoicePower VoiceUnrelentingForce2 (if the two effects it has is what you need), then to add a new animation (and other changes) to the effects. The new power can be added directly to the PlayerRef. I don't see the need for scripts here.

Edited by shumkar
Link to comment
Share on other sites

But in the magic effect windows i can't see an animation or a .hkx field!

 

Here's a screenshot

 

Unfortunately, I never dealt with the animation. Those 'visual effects' aren't animation? I thought, they are. May be, it's necessary to indicate the path to .hkx in some text file (.hkt?)... I don't know. Someone with experience in this area could help.

Edited by shumkar
Link to comment
Share on other sites

ok i have manually downloaded the SpartanKickMod and I studied the content. After loading it in the creation kit i found that there's a magic effect added with a script attached. It's a function in the script that makes it possible to load an animation (Spartankick.) Here's a screenshot.

And that's the script of the original mod:

Scriptname SpartanKickMGScript extends ActiveMagicEffect  

Event OnEffectStart(actor Target, actor Caster)
	If Switch
	Switch = False
	Int Cstamina
	float Fullstamina = Caster.GetAV("Stamina") as float
	float Hstamina = Caster.GetAV("Stamina") as float  * 1 / 10;Current Caster's Stamina Attack Point
		If Caster.GetAVPercentage("Stamina") > 1 / 2 as float
			Cstamina = Caster.GetAV("Stamina") as int  * 1 / 4;Current Caster's Stamina Attack Point
		EndIf
	Caster.PlayIdleWithTarget(SpartanKick, Target)
	Utility.wait(0.3)
	TimeLag.Cast(Caster, None)
	Utility.wait(0.4)
	If DebugSwitch
		Debug.notification("This is Sparta!!!!")
	EndIf
	Float zOffset = Target.GetHeadingAngle(Caster)
	Target.SetAngle(Target.GetAngleX(), Target.GetAngleY(), Target.GetAngleZ() + zOffset)
	int random = Utility.RandomInt(0, 99)
		If Random < 33
			int instanceID = KickSoundA.play(Caster)
		ElseIf Random >= 33 && Random < 66
			int instanceID = KickSoundB.play(Caster)
		Else
			int instanceID = KickSoundC.play(Caster)
		EndIf
	Utility.wait(0.1)
	Caster.PushActorAway(Target, Hstamina)
	Utility.wait(0.1)
	Target.ApplyHavokImpulse(0.0, 0.0, 0.1, FullStamina)
	Target.DamageAV("Health", Cstamina)
	Else
		;None
	EndIf
EndEvent

Event OnEffectFinish(Actor Target, Actor Caster)
	Switch = True
endEvent

Idle Property SpartanKick Auto
Spell Property TimeLag Auto

Sound Property KickSoundA Auto
Sound Property KickSoundB Auto
Sound Property KickSoundC Auto

Bool Switch = True
Bool Property DebugSwitch Auto

I understand some variables and syntax in this script but I really don't kow how to modify it in order to make it really simple. All the magic effects I need are avaliable in the creation kit i don't scripting for them. I need that script only for this little line about the animation to pick:

Caster.PlayIdleWithTarget(SpartanKick, Target)

What it's possible to remove from the original script? What have to stay? May I simply deactivate all the scripting effects but the animation one from the creation kit window i posted before? Or is there anyone that can help me with that? Thank you very much guys :D

Edited by CryLoar
Link to comment
Share on other sites

  • Recently Browsing   0 members

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