Jump to content

script.: can somebody help me with a OnCombatStateChanged script?


WeerW3ir

Recommended Posts

im making my new follower. kinda she is done. but she refusing to use her unique bound sword.

so i tried to write a script. but the script is not working at all. she still refusing to use her bound sword.

 

Scriptname AuroraFighting extends Actor
{Aurora's Fighting technics}

SPELL Property AuroraBoundSwordSP Auto
{Event OnCombatStateChanged Actor akTarget, int aeCombatState
if aeCombatState == 1
AuroraBoundSwordSP.cast self, self
endif
EndEvent}

 

the script is paired up with the spell on her in properties. but somesow its still not working. what can i do? or what im doing wrong? can somebody help?

Link to comment
Share on other sites

If that is how the script is written, you've got a problem. Looks as if you put the entire script inside the description field. When you create a new script inside the Creation Kit, you are prompted to enter a script name, the script it extends and a description of the script. After pressing OK a new window appears where you can enter the code and then build / compile the script.

 

Basically, you need to remove the { } from around the code. Then you'll find out that the script will not compile since the Cast function and OnCombatStateChanged event are missing their ( ).

 

I.E.

Scriptname AuroraFighting extends Actor  
{Aurora's Fighting technics}

SPELL Property AuroraBoundSwordSP Auto

Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
  if aeCombatState == 1
    AuroraBoundSwordSP.cast(self, self)
  endif
EndEvent

EDIT: Added an additional point of error...

Edited by IsharaMeradin
Link to comment
Share on other sites

If that is how the script is written, you've got a problem. Looks as if you put the entire script inside the description field. When you create a new script inside the Creation Kit, you are prompted to enter a script name, the script it extends and a description of the script. After pressing OK a new window appears where you can enter the code and then build / compile the script.

 

Basically, you need to remove the { } from around the code. Then you'll find out that the script will not compile since the Cast function and OnCombatStateChanged event are missing their ( ).

 

I.E.

Scriptname AuroraFighting extends Actor  
{Aurora's Fighting technics}

SPELL Property AuroraBoundSwordSP Auto

Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
  if aeCombatState == 1
    AuroraBoundSwordSP.cast(self, self)
  endif
EndEvent

EDIT: Added an additional point of error...

thank you. actually somehow that worked now. altought not really what i expected. as soon as she cast it she or unsheats it and switches to different ability, or starting to casting it and stops it in middle of the casting animation.

if i set her to not have any other ability on her, she just running away from the fight. then casting the weapon and instantly unsheats it. and its burning on her back lol

Edited by WeerW3ir
Link to comment
Share on other sites

ho

 

 

If that is how the script is written, you've got a problem. Looks as if you put the entire script inside the description field. When you create a new script inside the Creation Kit, you are prompted to enter a script name, the script it extends and a description of the script. After pressing OK a new window appears where you can enter the code and then build / compile the script.

 

Basically, you need to remove the { } from around the code. Then you'll find out that the script will not compile since the Cast function and OnCombatStateChanged event are missing their ( ).

 

I.E.

Scriptname AuroraFighting extends Actor  
{Aurora's Fighting technics}

SPELL Property AuroraBoundSwordSP Auto

Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
  if aeCombatState == 1
    AuroraBoundSwordSP.cast(self, self)
  endif
EndEvent

EDIT: Added an additional point of error...

thank you. actually somehow that worked now. altought not really what i expected. as soon as she cast it she or unsheats it and switches to different ability, or starting to casting it and stops it in middle of the casting animation.

if i set her to not have any other ability on her, she just running away from the fight. then casting the weapon and instantly unsheats it. and its burning on her back lol

 

omg. hold on. now its working. o.O

she refused to use it properly because the weapon was set to be eitherhand and not righthand ... -.-"

Link to comment
Share on other sites

  • Recently Browsing   0 members

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