dra6o0n Posted June 7, 2008 Share Posted June 7, 2008 But the problem is that, once you unequip the 1st cowl and put on the 2nd, it will end up switching the crimegold, fame, and infamy around. With 3 cowls, it will lead to a disasterous fame/infamy change. First off, I have a Grey Cowl of Nobody, with its +5 all attribute, it lets players store away their crimegold, fame, and infamy into variable "00playergold", etc. Then, I ran into a huge conflict once I go and checked the Begin OnEquip section... Here's the code of the 3 cowls ScriptName 00GreyCowlscript Short 00playerinfamyShort 00playerfameShort 00playergoldShort 00tempcrimegoldShort 00tempfameShort 00tempinfamy Begin OnAdd ;resets the item's crime,fame,infamy upon pickup. Set 00playergold to 0 Set 00playerfame to 0 Set 00playerinfamy to 0End Begin OnEquip Player Set 00tempcrimegold to player.getcrimegold ;saves the player's crime,fame,infamy to temp. Set 00tempfame to player.getpcfame Set 00tempinfamy to player.getpcinfamyplayer.setcrimegold 00playergold ;takes variable from item and applies it to player.player.setpcfame 00playerfameplayer.setpcinfamy 00playerinfamyEnd Begin OnUnequip Player set 00playergold to player.getcrimegold ;upon unequip, current player gold,fame,infamy is stored. set 00playerfame to player.getpcfame set 00playerinfamy to player.getpcinfamyplayer.setcrimegold 00tempcrimegold ;sets player's current stats to saved temp.player.setpcfame 00tempfameplayer.setpcinfamy 00tempinfamyEndScriptName 00GreyCowlscript2 Short 00playerinfamy2Short 00playerfame2Short 00playergold2Short 00tempcrimegold2Short 00tempfame2Short 00tempinfamy2 Begin OnAdd ;resets the item's crime,fame,infamy upon pickup. Set 00playergold2 to 0 Set 00playerfame2 to 25 Set 00playerinfamy2 to 0End Begin OnEquip Player Set 00tempcrimegold2 to player.getcrimegold ;saves the player's crime,fame,infamy to temp. Set 00tempfame2 to player.getpcfame Set 00tempinfamy2 to player.getpcinfamyplayer.setcrimegold 00playergold2 ;takes variable from item and applies it to player.player.setpcfame 00playerfame2player.setpcinfamy 00playerinfamy2End Begin OnUnequip Player set 00playergold2 to player.getcrimegold ;upon unequip, current player gold,fame,infamy is stored. set 00playerfame2 to player.getpcfame set 00playerinfamy2 to player.getpcinfamyplayer.setcrimegold 00tempcrimegold2 ;sets player's current stats to saved temp.player.setpcfame 00tempfame2player.setpcinfamy 00tempinfamy2EndScriptName 00GreyCowlscript3 Short 00playerinfamy3Short 00playerfame3Short 00playergold3Short 00tempcrimegold3Short 00tempfame3Short 00tempinfamy3 Begin OnAdd ;resets the item's crime,fame,infamy upon pickup. Set 00playergold3 to 0 Set 00playerfame3 to 0 Set 00playerinfamy3 to 25End Begin OnEquip Player Set 00tempcrimegold3 to player.getcrimegold ;saves the player's crime,fame,infamy to temp. Set 00tempfame3 to player.getpcfame Set 00tempinfamy3 to player.getpcinfamyplayer.setcrimegold 00playergold3 ;takes variable from item and applies it to player.player.setpcfame 00playerfame3player.setpcinfamy 00playerinfamy3End Begin OnUnequip Player set 00playergold3 to player.getcrimegold ;upon unequip, current player gold,fame,infamy is stored. set 00playerfame3 to player.getpcfame set 00playerinfamy3 to player.getpcinfamyplayer.setcrimegold 00tempcrimegold3 ;sets player's current stats to saved temp.player.setpcfame 00tempfame3player.setpcinfamy 00tempinfamy3End Note: I may have to create a new script to work out all three of them... Is a script's variable allowed to be used in another script? Otherwise I would have to make it one huge script... Link to comment Share on other sites More sharing options...
Vagrant0 Posted June 7, 2008 Share Posted June 7, 2008 First off, you might want to switch your little marker to something other than "OO" or "00". Both those are fairly common, and might lead to form and ID issues later on. Generally, you want to use atleast 3 characters so that there is a lower chance that someone else will use the same ones somewhere else. Maybe use something like "D6N" "DR6" of something else which nobody else would use. "DRG" or "DGN" would be a bad choice since anyone who uses the fairly common name Dragon, or Dagon, might use those. As for scripts being able to share variables. That depends alot on what the script is on. Things like Quests, Activators (containers, doors), or NPCs can be referenced and have their variables altered by other scripts. Things like spells or inventory items cannot. This is because the referencing requires a persistant ID to pull that information from. In this case, you would probably need to make a quest script linked to a startgame enabled quest without any journal entires. Then you can use that quest script to store and adjust whatever variables you need. Using global variables instead is a bad idea since those are more likely to run into conflicts. Link to comment Share on other sites More sharing options...
dra6o0n Posted June 7, 2008 Author Share Posted June 7, 2008 I Stopped trying to continue this, for 2 reason:1) The idea is good but running into conflicts is bad.2) My TES Construction Set is going glitchy and bitchy to me, so i wanna stop using it so much (everytime i close the construction set, whether i opened a file or not, it crashes).... Link to comment Share on other sites More sharing options...
Vagrant0 Posted June 7, 2008 Share Posted June 7, 2008 I Stopped trying to continue this, for 2 reason:2) My TES Construction Set is going glitchy and bitchy to me, so i wanna stop using it so much (everytime i close the construction set, whether i opened a file or not, it crashes)....The CS crashes for pretty much everyone when closing. It's because it has trouble unloading information. It's when it crashes while you're working, and when you havn't done any of the dozen or so things that will always make it crash, that you should be concerned. It's a buggy application, but it's the best that is available, and the best we'll ever get. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.