FunkyGandalfCat Posted August 28, 2017 Share Posted August 28, 2017 (edited) Hello! So, while in the proccess of creating my first quest mod ever, I stumbled across this, basically: The character will find a certain item in the dungeon(that object being a static mesh), after interacting with this object(which is an activator), the player gets an item, ok, till this part, I scripted it without problems, after this I want to get rid of this activator/object, otherwise the player will infinitely get the item, but I dont know how to do it, the Papyrus wiki is confusing me in this part. and also, that said, can I move mutiple objects to the same place using this same script? Thank you! Edited August 28, 2017 by FunkyGandalfCat Link to comment Share on other sites More sharing options...
PeterMartyr Posted August 28, 2017 Share Posted August 28, 2017 try Disable() Link Multiple Object to an X Marker & apply script to that. Also 'If' Statements can used, like. actor PlayerREF = game.GetPlayer() If(PlayerREF.GetItemCount(YourObject) != 0 && Quest.GetStage() == 25) PlayerREF.AddItem(YourObject) EndIfAlso I 'think' there is a Default Disable Activator Script after use too, using States. Don't quote me on that, I not gonna check it. Anywho type Default and have a look at what's available. Link to comment Share on other sites More sharing options...
FunkyGandalfCat Posted August 28, 2017 Author Share Posted August 28, 2017 try Disable() Link Multiple Object to an X Marker & apply script to that. Also 'If' Statements can used, like. actor PlayerREF = game.GetPlayer() If(PlayerREF.GetItemCount(YourObject) != 0 && Quest.GetStage() == 25) PlayerREF.AddItem(YourObject) EndIfAlso I 'think' there is a Default Disable Activator Script after use too, using States. Don't quote me on that, I not gonna check it. Anywho type Default and have a look at what's available.Thanks for your reply.That is very helpful.But how do I actually move the object? I would like the object to completely disappear after interacting with it. Link to comment Share on other sites More sharing options...
PeterMartyr Posted August 28, 2017 Share Posted August 28, 2017 An ObjectReference code MoveTo(), I would place an Xmarker in the void and move it to that. YourObject.MoveTo(XMarker) Link to comment Share on other sites More sharing options...
foamyesque Posted August 28, 2017 Share Posted August 28, 2017 try Disable() Link Multiple Object to an X Marker & apply script to that. Also 'If' Statements can used, like. actor PlayerREF = game.GetPlayer() If(PlayerREF.GetItemCount(YourObject) != 0 && Quest.GetStage() == 25) PlayerREF.AddItem(YourObject) EndIfAlso I 'think' there is a Default Disable Activator Script after use too, using States. Don't quote me on that, I not gonna check it. Anywho type Default and have a look at what's available.Thanks for your reply.That is very helpful.But how do I actually move the object? I would like the object to completely disappear after interacting with it. Disable() should do the trick. Link to comment Share on other sites More sharing options...
FunkyGandalfCat Posted August 29, 2017 Author Share Posted August 29, 2017 (edited) try Disable() Link Multiple Object to an X Marker & apply script to that. Also 'If' Statements can used, like. actor PlayerREF = game.GetPlayer() If(PlayerREF.GetItemCount(YourObject) != 0 && Quest.GetStage() == 25) PlayerREF.AddItem(YourObject) EndIfAlso I 'think' there is a Default Disable Activator Script after use too, using States. Don't quote me on that, I not gonna check it. Anywho type Default and have a look at what's available.Thanks for your reply.That is very helpful.But how do I actually move the object? I would like the object to completely disappear after interacting with it. Disable() should do the trick. I am trying to disable it, but does not work, I guess because its a Activator Property and not a ObjectReference.But how to make my activator work if its not set a Activator Property? I guess this will no work sadly.But well, thanks for your help, I actually learned a few things here. This is the Script btw.Basically, the script was supposed to make the object being used as activator AND another object to dissapear,____________________________________________________ Scriptname GiveGlassMaceScript extends ObjectReference Activator Property GlassMaceLightActivator Auto WEAPON Property GlassMace Auto ObjectReference Property GlassMaceLightON Auto EVENT onActivate(ObjectReference akActionRef) Game.GetPlayer().AddItem(GlassMace, 1, false)GlassMaceLightON.Disable() EndEvent ____________________________________________________ When I compile like this it works.But if I add the line:GlassMaceLightActivator.Disable()The compile fails.Take a look:____________________________________________________ Scriptname GiveGlassMaceScript extends ObjectReference Activator Property GlassMaceLightActivator Auto WEAPON Property GlassMace Auto ObjectReference Property GlassMaceLightON Auto EVENT onActivate(ObjectReference akActionRef) Game.GetPlayer().AddItem(GlassMace, 1, false)GlassMaceLightON.Disable()GlassMaceLightActivator.Disable() EndEvent_______________________________________________ It fails while compiling this. Edited August 29, 2017 by FunkyGandalfCat Link to comment Share on other sites More sharing options...
foamyesque Posted August 29, 2017 Share Posted August 29, 2017 What are you attaching the script to in the CK? The activator, correct? Link to comment Share on other sites More sharing options...
FunkyGandalfCat Posted August 29, 2017 Author Share Posted August 29, 2017 What are you attaching the script to in the CK? The activator, correct?correct. Link to comment Share on other sites More sharing options...
foamyesque Posted August 29, 2017 Share Posted August 29, 2017 What are you attaching the script to in the CK? The activator, correct?correct. You don't need the activator property then. Your script extends object references, and is on the activator object, which means it has access to all the usual ObjectReference functions as run on the object it is attached to. Explicitly, you can call self.Disable(), but Papyrus will also understand just Disable(). Link to comment Share on other sites More sharing options...
FunkyGandalfCat Posted August 29, 2017 Author Share Posted August 29, 2017 What are you attaching the script to in the CK? The activator, correct?correct. You don't need the activator property then. Your script extends object references, and is on the activator object, which means it has access to all the usual ObjectReference functions as run on the object it is attached to. Explicitly, you can call self.Disable(), but Papyrus will also understand just Disable(). Thank you sir, It worked!Sorry about my lack of knowledge, scripting is quite hard to me, I go more for the 3d modelling side. Link to comment Share on other sites More sharing options...
Recommended Posts