Scriptname SampleScript Extends ReferenceAlias Int AttackKey Bool IsKeyPressed Event OnInit() AttackKey = Input.GetMappedKey("Right Attack/Block", deviceType = 0xFF) RegisterForKey(AttackKey) RegisterForAnimationEvent(Game.GetPlayer(), "preHitFrame") EndEvent Event OnAnimationEvent(ObjectReference akSource, string asEventName) if asEventName == "preHitFrame" if IsKeyPressed ; パワーアタック endif endif EndEvent Event OnKeyDown(Int aiKeyCode) IsKeyPressed = true EndEvent Event OnKeyUp(Int aiKeyCode, Float afHoldTime) IsKeyPressed = false EndEvent