lordneverar Posted June 14, 2008 Share Posted June 14, 2008 I added a script to a ring and now it weighs nothing in-game. whats wrong? here is the script I added... scn LORDtheonering10unequip Begin OnUnequip player.UnequipItem LordTheOneRing10player.additem LORDOneRingR 1player.removespell LORDOneRingInvisoMessage "The ring has returned to its normal state."End Link to comment Share on other sites More sharing options...
nosisab Posted June 14, 2008 Share Posted June 14, 2008 I added a script to a ring and now it weighs nothing in-game. whats wrong? here is the script I added... scn LORDtheonering10unequip Begin OnUnequip player.UnequipItem LordTheOneRing10player.additem LORDOneRingR 1player.removespell LORDOneRingInvisoMessage "The ring has returned to its normal state."Endgood question, since I don't know what is being done... better saying the only information that 'may' give some clues is whatever is that spell, it is being removed.I think the better help is:Open Construction Setgoto Help menuclick ContentsIn the wiki page for the CS you go to "scripting" linkread the tutorials there Link to comment Share on other sites More sharing options...
lordneverar Posted June 14, 2008 Author Share Posted June 14, 2008 I added a script to a ring and now it weighs nothing in-game. whats wrong? here is the script I added... scn LORDtheonering10unequip Begin OnUnequip player.UnequipItem LordTheOneRing10player.additem LORDOneRingR 1player.removespell LORDOneRingInvisoMessage "The ring has returned to its normal state."Endgood question, since I don't know what is being done... better saying the only information that 'may' give some clues is whatever is that spell, it is being removed.I think the better help is:Open Construction Setgoto Help menuclick ContentsIn the wiki page for the CS you go to "scripting" linkread the tutorials thereFirst off, im only 16 so its understandable for me to have trouble understanding scripts. Second how do you think I know the basic amount of scripting that I do know?Instead of being snide why don't you help me. Link to comment Share on other sites More sharing options...
nosisab Posted June 14, 2008 Share Posted June 14, 2008 I added a script to a ring and now it weighs nothing in-game. whats wrong? here is the script I added... scn LORDtheonering10unequip Begin OnUnequip player.UnequipItem LordTheOneRing10player.additem LORDOneRingR 1player.removespell LORDOneRingInvisoMessage "The ring has returned to its normal state."EndAlbeit is advised you reading the tutorials, there are things I can say here to help you understanding the mechanics of what seems you are trying to do:Since this is an unequip block this must be an object script attached to, if the name of it is significant, LordTheOneRing10 ... and so you must retire the "unequip" from the script name. Why? because in this script you will deal with the OnAdd, Onequip and Onunequip blocks as you need, even gamemode that you must avoid whenever possible. So is in This script you will do all this. Each block will be fired when the associated action is take. in the Begin OnAdd you treat what is to do whenever the player (or container) get the item Begin OnEquip block will run whenever the actor (player in your case, seems, but since you don't specific this, all actors are valid) equip the item. Begin OnUnequip will run Only when the player (actor) unequip the item, of course once these blocks are action drove you don't (as in your script) redo that action. Says, the Begin OnUnequip will fire whenever the ring is unequiped, so you doesn't need use command to this. There seems you wanted "Remove" it, but you must do this remove from other place for obvious reasons. Maybe the new item does this in it's OnAdd block Whatever your new ring were to do, this were to be done in the Begin OnAdd in it's own object script.Edit: Seems to have an issue that prevents some begin blocks firing when the item is placed in the actor container by another script. those tutorials will clarify this. Remember, all these blocks mentioned above goes in the same "Object script" of this item. they will fire whenever the action having a Begin block is performed. And just this block run at the time, terminating and leaving (except eventual game mode that runs every frame, why this must be avoided whenever possible). Remember each script can have more than one begin type. Link to comment Share on other sites More sharing options...
lordneverar Posted June 14, 2008 Author Share Posted June 14, 2008 I added a script to a ring and now it weighs nothing in-game. whats wrong? here is the script I added... scn LORDtheonering10unequip Begin OnUnequip player.UnequipItem LordTheOneRing10player.additem LORDOneRingR 1player.removespell LORDOneRingInvisoMessage "The ring has returned to its normal state."EndAlbeit is advised you reading the tutorials, there are things I can say here to help you understanding the mechanics of what seems you are trying to do:Since this is an unequip block this must be an object script attached to, if the name of it is significant, LordTheOneRing10 ... and so you must retire the "unequip" from the script name. Why? because in this script you will deal with the OnAdd, Onequip and Onunequip blocks as you need, even gamemode that you must avoid whenever possible. So is in This script you will do all this. Each block will be fired when the associated action is take. in the Begin OnAdd you treat what is to do whenever the player (or container) get the item Begin OnEquip block will run whenever the actor (player in your case, seems, but since you don't specific this, all actors are valid) equip the item. Begin OnUnequip will run Only when the player (actor) unequip the item, of course once these blocks are action drove you don't (as in your script) redo that action. Says, the Begin OnUnequip will fire whenever the ring is unequiped, so you doesn't need use command to this. There seems you wanted "Remove" it, but you must do this remove from other place for obvious reasons. Maybe the new item does this in it's OnAdd block Whatever your new ring were to do, this were to be done in the Begin OnAdd in it's own object script.Edit: Seems to have an issue that prevents some begin blocks firing when the item is placed in the actor container by another script. those tutorials will clarify this. Remember, all these blocks mentioned above goes in the same "Object script" of this item. they will fire whenever the action having a Begin block is performed. And just this block run at the time, terminating and leaving (except eventual game mode that runs every frame, why this must be avoided whenever possible). Remember each script can have more than one begin type.Im sorry but im not understanding this at all. If I told you exactly what I wanted to happen could you write the script for me with example names in the places where I need to put the referance Id stuff (eg. "youRingHere") Ide give you credit in the mod Link to comment Share on other sites More sharing options...
nosisab Posted June 14, 2008 Share Posted June 14, 2008 LorNeverar, We all, everyone need to begin by the beginning. Those tutorials are good ones, I learn very much there. They are clear and range from the beginner to advanced. The people in this community is the most helpful I ever saw in similar ones. You just need help yourself too. I'm no native English speaker, maybe something I try to explain isn't done the better way. Your questions shows you can do the scripting thing, just need know how. For this those tutorials were wrote. sadly I can't do it for you since I'm already compromised with several projects. Trust yourself. when you get the principles you'll find scripting easy. what I said in the former post was scripts can and often have more than one different Begin/end blocks. One for each action performed and each one starting, performing and exiting without the others running. For example when you get one item with Begin OnAdd this code will run, but not the Begin OnEquip in the same script. But when equip it will be just and only the OnEquip block to run. now I have a better idea about what you are trying to do with the ring. Instead dealing with spells of feather/burden you can treat this directly with the GetActorValue encumbrance function. Once you have how many encumbrance the player have you can set it to any value you want ... for example adding certain percentage of that encumbrance to the actual value of it. this can emulate a continuous increase in weight and I think encumbrance can be obtained even without OBSE. other way is using Fatigue instead, in the same function type. these actor functions often have Get/Mod/Set that you can look in the functions list in that wiki link. Link to comment Share on other sites More sharing options...
nosisab Posted June 14, 2008 Share Posted June 14, 2008 I added a script to a ring and now it weighs nothing in-game. whats wrong? here is the script I added... scn LORDtheonering10unequip Begin OnUnequip player.UnequipItem LordTheOneRing10player.additem LORDOneRingR 1player.removespell LORDOneRingInvisoMessage "The ring has returned to its normal state."Endgood question, since I don't know what is being done... better saying the only information that 'may' give some clues is whatever is that spell, it is being removed.I think the better help is:Open Construction Setgoto Help menuclick ContentsIn the wiki page for the CS you go to "scripting" linkread the tutorials thereFirst off, im only 16 so its understandable for me to have trouble understanding scripts. Second how do you think I know the basic amount of scripting that I do know?Instead of being snide why don't you help me.Was not my intention being snide. Look yourself the informations you gave. Nothing is said there about anything beyond their names. You know what that ring does. To us they are just rings, we can't know what they are supposed to do. Keep this in mind when asking for help. Others don't have a way to know what something does if this is not said or shown. Link to comment Share on other sites More sharing options...
Vagrant0 Posted June 14, 2008 Share Posted June 14, 2008 How many threads do you need for this? Seperating it only makes it harder for people to give you information since you end up getting the same answers in 5 different places. That said, scripting (outside of OBSE atleast) cannot make an item weigh 0. This is controlled in the CS. Since you are not using OBSE, you must have obviously made a mistake when defining the item. Unless of course you are talking about the burden effect, which is a seperate matter entirely, and would show up on the ring itself. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.