IsharaMeradin Posted December 31, 2017 Share Posted December 31, 2017 The remaining obvious question: Have you compiled the script? Do you have a PEX version in your scripts folder? If not, then you need to compile / build the script after writing / editing. Beyond that, without actually seeing everything you are doing, I cannot help. Link to comment Share on other sites More sharing options...
Koalmex Posted December 31, 2017 Author Share Posted December 31, 2017 (edited) First, indent the line with the unequipitem function in it. if that doesn't work, Try changing the extends from "ObjectReference" to "Armor" If that doesn't work, try making the armor a property and using this:Game.GetPlayer().Unequipitem(property name) If none of that works and you're feeling like using a script loophole, you could always make the item a property and use this:Game.GetPlayer().Removeitem(property name, 1)Game.GetPlayer().Additem(property name, 1)What is indent? Scriptname zxAnger3 extends ObjectReference {asd} Armor Property Anger3 Auto Event OnEquipped(Actor akActor) Game.GetPlayer().Unequipitem(Anger3) EndEventI do not know if I did it right, it does not work The remaining obvious question: Have you compiled the script? Do you have a PEX version in your scripts folder? If not, then you need to compile / build the script after writing / editing. Beyond that, without actually seeing everything you are doing, I cannot help. Yes, I am saving the script well, I know it because I have another function in the same script that works, but the UnEquip does not work Edited January 1, 2018 by Koalmex Link to comment Share on other sites More sharing options...
Roadhouse699 Posted January 1, 2018 Share Posted January 1, 2018 Intending is what you didn't do on either script. You press "tab" in front of the line to make it shift over a sizable space, like this: Scriptname zxAnger3 extends ObjectReference Armor Property Anger3 Auto Event OnEquipped(Actor akActor) Game.GetPlayer().Unequipitem(Anger3) EndEvent As opposed to Scriptname zxAnger3 extends ObjectReference Armor Property Anger3 Auto Event OnEquipped(Actor akActor) Game.GetPlayer().Unequipitem(Anger3) EndEvent Link to comment Share on other sites More sharing options...
Koalmex Posted January 1, 2018 Author Share Posted January 1, 2018 Intending is what you didn't do on either script. You press "tab" in front of the line to make it shift over a sizable space, like this: Scriptname zxAnger3 extends ObjectReference Armor Property Anger3 Auto Event OnEquipped(Actor akActor) Game.GetPlayer().Unequipitem(Anger3) EndEvent As opposed to Scriptname zxAnger3 extends ObjectReference Armor Property Anger3 Auto Event OnEquipped(Actor akActor) Game.GetPlayer().Unequipitem(Anger3) EndEvent I did not know, I already tried and it did not work :( Link to comment Share on other sites More sharing options...
IsharaMeradin Posted January 1, 2018 Share Posted January 1, 2018 Add a Debug.Notication line temporarily to ensure that the OnEquipped event is being triggered. If that works, it could be possible that UnequipItem is one of the functions that does not work on scripts on objects when they are stored inside of a container or inventory. If that is the case, you'll have to go with a different approach. Link to comment Share on other sites More sharing options...
Koalmex Posted January 1, 2018 Author Share Posted January 1, 2018 (edited) Add a Debug.Notication line temporarily to ensure that the OnEquipped event is being triggered. If that works, it could be possible that UnequipItem is one of the functions that does not work on scripts on objects when they are stored inside of a container or inventory. If that is the case, you'll have to go with a different approach. The "OnEquipped" works, since I have another script inside it Edited January 1, 2018 by Koalmex Link to comment Share on other sites More sharing options...
agerweb Posted January 2, 2018 Share Posted January 2, 2018 If you have other lines inside the Onequiped Event they maybe causing a problem. Link to comment Share on other sites More sharing options...
Recommended Posts