Jump to content

Requesting Help with 2 scripts please!


Recommended Posts

Hello all! Hope you are well. I would really be grateful if anyone could help with my script issues!

 

1ST SCRIPT (So this script forces the caster to play a custom animation (I renamed a vanilla animation) when he uses a spell or shout) I currently get this error: no viable alternative at input '.'

Scriptname AmonPlayDragonAnimation extends ActiveMagicEffect  

bool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native

Debug.SendAnimationEvent(SomeObjectRef,"AmonStandingBreath")

string property sAction auto

Event OnEffectStart (Actor akTarget, Actor akCaster)
    debug.SendAnimationEvent(akCaster, "AmonStandingBreath")
    debug.notification("doing action")
endEvent

 

2ND SCRIPT (This script causes the target to play 2 animations after he is hit by the spell)  With this script I get this error:  the return type of function registerforanimationevent in the empty state on script amonplayeranimationscript do not match the parent script activemagiceffect

 

Scriptname AmonPlayerAnimationScript extends ActiveMagicEffect  

Actor Property PlayerRef Auto

Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native

Event OnEffectStart (Actor akTarget, Actor akCaster)
    debug.SendAnimationEvent(PlayerRef, "T02_Ascend")
    debug.notification("doing action")

Utility.Wait(4.0)

       debug.SendAnimationEvent(PlayerRef, "WebIdleExit")
    debug.notification("doing action")

EndEvent

Link to comment
Share on other sites

First script, drop these three lines:

 bool Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native

Debug.SendAnimationEvent(SomeObjectRef,"AmonStandingBreath")

string property sAction auto 

 

Link to comment
Share on other sites

That should be enough to compile and allow you to test.

Getting animations to work reliably is not always so simple, but sometimes it is.  Give it a try and see what gives.

When the magic effect starts, you are probably still finishing the casting animation, which could interfere with your animation.  In that case, try inserting a "Utility.wait( 1.0)" before debug.SendAnimationEvent. There are better ways of dealing with this that using "wait" but we can discuss them after confirming they are necessary.

Link to comment
Share on other sites

5 hours ago, xkkmEl said:

That should be enough to compile and allow you to test.

Getting animations to work reliably is not always so simple, but sometimes it is.  Give it a try and see what gives.

When the magic effect starts, you are probably still finishing the casting animation, which could interfere with your animation.  In that case, try inserting a "Utility.wait( 1.0)" before debug.SendAnimationEvent. There are better ways of dealing with this that using "wait" but we can discuss them after confirming they are necessary.

Thank you will try that and report back. Will be a week until I can check but will reply asap. Thank you!

Link to comment
Share on other sites

  • Recently Browsing   0 members

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