Jump to content

Quick question: Is it possible to terminate a script?


trashgarbage666

Recommended Posts

I'm writing a script for a piece of armor. When I unequip the armor, the script continues to run. Is there a command I can put in an OnUnequip block that tells the script to terminate itself?

Edited by punchbattle
Link to comment
Share on other sites

What does your script look like ? Is it that you are seeing continued results from the script , or are you just worried about the performance impact ?

Because some conditions could be put in to stop the outcome . But to turn scripts on/off ... Using a quest script to run most of it would be the way to do it. Or use an effect script that you attach to the armor via an object effect , may be able to work depending on the result you're wanting.

 

But the quest script route , you just have your armor script do this.

 

Begin OnEquip ; what ever parameter here ... or

; If bla bla has equipped the armor

 

StartQuest MyArmorQuest

 

;endif

End

 

Begin OnUnEquip

 

StopQuest MyArmorQuest

End

~~~~~~~~~~~~

 

And if you need variables stored per instance of this armor ... Then put those in the armor script , which the quest script can access via "GetScriptVariable"

Link to comment
Share on other sites

I'm writing a script for a piece of armor. When I unequip the armor, the script continues to run. Is there a command I can put in an OnUnequip block that tells the script to terminate itself?

 

An object script on a piece of armor should only run when the armor is equipped, do you have a quest script linked to it or something? I'd just post the script so we can see what's going on.

Link to comment
Share on other sites

 

I'm writing a script for a piece of armor. When I unequip the armor, the script continues to run. Is there a command I can put in an OnUnequip block that tells the script to terminate itself?

 

An object script on a piece of armor should only run when the armor is equipped, do you have a quest script linked to it or something? I'd just post the script so we can see what's going on.

 

 

Ya thats what I thought ... and would guess something else is going on there , so we be needing to see the script :geek:

Link to comment
Share on other sites

  • Recently Browsing   0 members

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