Jump to content

[LE] Script problem - left hand


GSGlobe

Recommended Posts

Use both CK version & Script version, has I show you can register for left hand only, but since CK doesn't distinguish between hands use the Script Version where applicable to do so.

 

It all about logic of it of what you require?

  1. If the player has a Staff Register for animation Event with CK Either Hand
  2. If it in this left hand do this.
  3. If it in the right hand do this
  4. If both hands don't have staff unregister

 

so leave the ME Start & Finished alone && look at this.

Event OnAnimationEvent(ObjectReference akSource, string asEventName)

    If( akSource == Game.GetPlayer())

        Int RightHand = GetEquippedItemType(1)
         if (asEventName == "MRh_SpellFire_Event" && RightHand == 8)
             ; Right
        
             if akSource.issneaking()
              
                 af_release_staffsneakspellench.cast(akSource)  ;; WORKS (RIGHT STAFF)
             else
              
             af_release_staffspellench.cast(akSource)  ;; WORKS (RIGHT STAFF)
             EndIf
         EndIf

        Int  LeftHand = GetEquippedItemType(0)     
        if (asEventName == "MLh_SpellFire_Event" && LeftHand == 8)
             ; Left
              
             if akSource.issneaking()
              
                 af_release_staffsneakspellench.cast(akSource)
             else
              
                   Icespike.cast(akSource) ;; Vanilla Spell WORKS
             EndIf
         endif
    EndIf
EndEvent

Now let's consider the Script

; Cast this spell from an ObjectReference, optionally toward another.
Function Cast(ObjectReference akSource, ObjectReference akTarget=NONE) native

No Lefty

 

So try duplicating the SPELLS into Right Hand Only & Left Hand Only, so CK knows which hand to use, then Adjust the Script.

 

The Extra validation of the Staff will block Empty hand Cast.

 

Also I have never attempted any like that, but common sense said it should work. You can only try.

 

 

 

Oh lose

Actor caster

You don't need it, like the player is akTarget, the player is the akSource in the Animation Event, just pointing that out. If case you miss the HINT.

 

 

Link to comment
Share on other sites

What most call bugs, I consider the Game Engine doing exactly what you told it to do, within the limitation of how it interpret those instruction, & what is possible. We all hit that brick wall of what is possible, sooner or later. Thinking like that will help solve problems, calling a bug doesn't.

Edited by PeterMartyr
Link to comment
Share on other sites

Thank you alot for the valueable information, I'll try to once I get home! I'm understanding it abit clearer now, very grateful :)

 

Thanks for explaining it!

I'll try with left hand spell and right hand spell and write the script :)

Link to comment
Share on other sites

  • 2 weeks later...
  • Recently Browsing   0 members

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