Jump to content

Enable/disable script problem


Razakel

Recommended Posts

I'm trying to make a script that enables and disables an item after a potion is drunk so the effect is to pick up a glass, fill it and then put the glass back down. The first part works but the second part doesn't re-enable the object. Any hints?

 

(This first part is set on an activator)

 

scn 0TiberSeptimWineGlassScript

 

Begin OnActivate

 

TSWineGoblet.disable

player.additem UpperSilverGoblet02 1

 

end

 

(This part is added to a potion)

 

scn 0TiberSeptimWineGlass2Script

 

Begin OnActivate

 

TSWineGoblet.enable

 

End

Link to comment
Share on other sites

I'm trying to make a script that enables and disables an item after a potion is drunk so the effect is to pick up a glass, fill it and then put the glass back down. The first part works but the second part doesn't re-enable the object. Any hints?

yep... OnActivate is only run in the world not menus; when in your inventory if you activate an item it instead runs OnEquip... however I've heard that won't work for potions...

so change part 2 to this:

scn 0TiberSeptimWineGlass2Script

Begin OnEquip

TSWineGoblet.enable

End

and if that doesn't work (as I've heard IIRC) you'll have to do it the complicated way - add a script effect to the potion and in the script effect's script use this code:

scn 0TiberSeptimWineGlass2bScript

Begin ScriptEffectStart

TSWineGoblet.enable

End

Hope that helps

Pacific Morrowind

Link to comment
Share on other sites

  • Recently Browsing   0 members

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