Toying around with a script. Need some help.

Post » Tue Jun 19, 2012 1:48 pm

Scriptname VampireCelerityScript extends activemagiceffect  Actor Property Player AutoFunction SetMotionType(int aiMotionType, bool abAllowActivate = true) native	 Event OnEffectStart(Actor Target, Actor Caster)		  Player = Game.GetPlayer()          Player.SetMotionType(Player.Motion_Dynamic)		  If (Target == Game.GetPlayer())   		    Player.TranslateTo(100.0, 100.0, 100.0, 90.0, 90.0, 90.0, 500.0, 75.0)		  EndIf	 EndEventEndFunction

I get a compile error for line 13 (which is the last line) saying there is no EOF at 'EndFunction'

I had the impression EndFunction was the End Of Function. What am I missing here?

The script itself is bologna for learning. It actually worked to some extent. When I fired the spell my character do move, however he never stopped moving when the spell ended. That will be next hurdle. Right now I need help for why the script wont compile.

Thanks.
User avatar
Robyn Lena
 
Posts: 3338
Joined: Mon Jan 01, 2007 6:17 am

Post » Tue Jun 19, 2012 9:47 pm

Why are you defining an event within a function definition? Actually, more importantly, why are you trying to redefine a native function?

You should never ever ever need to touch the native keyword. It's used in declaring native functions in native scripts, and you'll only ever need to touch these functions in order to call them.

You need to get rid of that native function declaration and your "EndFunction" line.

Cipscis
User avatar
Penny Flame
 
Posts: 3336
Joined: Sat Aug 12, 2006 1:53 am

Post » Tue Jun 19, 2012 11:43 am

Why are you defining an event within a function definition? Actually, more importantly, why are you trying to redefine a native function?

You should never ever ever need to touch the native keyword. It's used in declaring native functions in native scripts, and you'll only ever need to touch these functions in order to call them.

You need to get rid of that native function declaration and your "EndFunction" line.

Cipscis

Thanks mate. I wasn't aware of that. Now I get it. You're the man.
User avatar
Joe Alvarado
 
Posts: 3467
Joined: Sat Nov 24, 2007 11:13 pm


Return to V - Skyrim