Jump to content

Rings Script Help


Jojash

Recommended Posts

So, I'm trying to make two rings (One is called Light and the other one is called Dark) that are useless unless you equip them both but I can't make it work, here's the script I'm using for it:

ScriptName 0Dark&Light

 

short GotLight

 

Begin OnEquip Player

 

if GotLight == 0

Player.ModActorValue Destruction 100

Player.ModActorValue Illusion 100

Player.ModActorValue HandToHand 200

Player.ModActorValue Strength 100

set GotLight to 1

endif

 

End

 

 

Begin OnUnequip Player

 

if GotLight == 1

Player.ModActorValue Destruction -100

Player.ModActorValue Illusion -100

Player.ModActorValue HandToHand -200

Player.ModActorValue Strength -100

set GotLight to 0

endif

 

End

 

This script is for the ring called dark not Light because I want the ring to work only of the other ring is equipped, Light has a similar script.

 

I don't know if the script is the problem but it seems to be the only thing that can really go wrong, so any help would be greatly apreciated. Thanks in advance :)

Link to comment
Share on other sites

Canyou tell me how to do that? Or post a link to a tut that would teach me how to do so? (Sorry I'm pretty terrible at scripts :( )
Link to comment
Share on other sites

Short variables are 0 by default anyway so there is no need for it to be set before the main body of the script.

 

Give me about 20 mins and I will write an alternate version for you and edit this post to show this.

 

 

ScriptName 0Dark&Light ;object script

 

short GotLight

 

Begin GameMode

 

if GotLight == 0 && player.getequipped < Ring ID > == 1

Player.ModActorValue Destruction 100

Player.ModActorValue Illusion 100

Player.ModActorValue HandToHand 200

Player.ModActorValue Strength 100

set GotLight to 1

endif

 

if GotLight == 1 && player.getequipped < Ring ID > == 0

Player.ModActorValue Destruction -100

Player.ModActorValue Illusion -100

Player.ModActorValue HandToHand -200

Player.ModActorValue Strength -100

set GotLight to 0

endif

 

if player.getequipped < Ring ID > == 0 ;just to make sure GotLight is set to 0

set GotLight to 0

endif

 

end

 

Try it this way, although I could not see what was wrong with your origional script.

Edited by slygothmog
Link to comment
Share on other sites

You are trying to make 2 objects with a different ID, but a script that has a variable dependant on the script for the other ID. That will not work unless you use a refernece to a quest variable.
Link to comment
Share on other sites

You are trying to make 2 objects with a different ID, but a script that has a variable dependant on the script for the other ID. That will not work unless you use a refernece to a quest variable.

 

How do I do that?

Link to comment
Share on other sites

Hmm I would tell you if I knew

Sorry D;

I don't suppose you would know where a tutorial for it was?

Link to comment
Share on other sites

  • Recently Browsing   0 members

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