DarkWandererAmon Posted August 25, 2024 Share Posted August 25, 2024 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 More sharing options...
xkkmEl Posted August 25, 2024 Share Posted August 25, 2024 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 More sharing options...
xkkmEl Posted August 25, 2024 Share Posted August 25, 2024 Second script, just drop this one line: Function RegisterForAnimationEvent(ObjectReference akSender, string asEventName) native Link to comment Share on other sites More sharing options...
DarkWandererAmon Posted August 27, 2024 Author Share Posted August 27, 2024 Thank you so much, will I have to do anything else other than those? Link to comment Share on other sites More sharing options...
xkkmEl Posted August 27, 2024 Share Posted August 27, 2024 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 More sharing options...
DarkWandererAmon Posted August 27, 2024 Author Share Posted August 27, 2024 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 More sharing options...
DarkWandererAmon Posted September 1, 2024 Author Share Posted September 1, 2024 Sadly it didnt work. The script compiles nicely and I also get the debug but animations dont play Link to comment Share on other sites More sharing options...
Recommended Posts