Cohagen Posted November 28, 2016 Share Posted November 28, 2016 I feel like a dumb person, once again here cap in hand to ask for your help. I have been making a mod which allows you to go to a specific terminal and play a 90s style action minigame.I have so far created all new assets including models, textures, videos, sounds and now im ready to script it all together but im already stuck.I want to start a stage in my quest by clicking on an activator.I want it to work like the 'DefaultSetStageTriggerPlayerOnly' activator only instead of activating my quest by walking into the activator i want to activate the it manually. I tried:OnactivateMODQuest1.SetStage(20)But nothing happened. My second query is, is there a script that will store the players inventory into a container and return it all when i want it too?That is important so that i can keep players from bringing HD stuff into my retro minigame. Thank you anyone than can help me, i love making mods but scripts always sets me back. Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 28, 2016 Share Posted November 28, 2016 For the activator script try this: Quest Property YourQuest Auto Event OnActivate(ObjectReference akActionRef) YourQuest.SetStage(20) EndEvent Add this script to your activator and make sure not to forget to fill the quest property. For storing the players items you can use RemoveAllItems but make sure the container you move to is in the same cell as the player when removing/giving back. (See the notes on the wiki page)Your script for this should be something like this: ObjectReference Property StorageContianer Auto Event OnActivate(ObjectReference akActionRef) ;or use a different event to triggers this Game.GetPlayer().RemoveAllItems(StorageContianer, True) EndEvent To move it back use this: ObjectReference Property StorageContianer Auto Event OnActivate(ObjectReference akActionRef) ;or use a different event to triggers this StorageContianer.RemoveAllItems(Game.GetPlayer(), True) EndEvent Link to comment Share on other sites More sharing options...
Cohagen Posted November 28, 2016 Author Share Posted November 28, 2016 For the activator script try this: Quest Property YourQuest Auto Event OnActivate(ObjectReference akActionRef)  YourQuest.SetStage(20) EndEvent Add this script to your activator and make sure not to forget to fill the quest property. For storing the players items you can use RemoveAllItems but make sure the container you move to is in the same cell as the player when removing/giving back. (See the notes on the wiki page)Your script for this should be something like this: ObjectReference Property StorageContianer Auto  Event OnActivate(ObjectReference akActionRef) ;or use a different event to triggers this   Game.GetPlayer().RemoveAllItems(StorageContianer, True) EndEvent  To move it back use this: ObjectReference Property StorageContianer Auto  Event OnActivate(ObjectReference akActionRef) ;or use a different event to triggers this   StorageContianer.RemoveAllItems(Game.GetPlayer(), True) EndEvent Wow great, thanks for replying. I will try as soon as I get home.WithEvent OnActivate(ObjectReference akActionRef) do I paste it as is or make object reference a property? Thanks Link to comment Share on other sites More sharing options...
Cohagen Posted November 28, 2016 Author Share Posted November 28, 2016 For the activator script try this: Quest Property YourQuest Auto Event OnActivate(ObjectReference akActionRef)  YourQuest.SetStage(20) EndEvent Add this script to your activator and make sure not to forget to fill the quest property. For storing the players items you can use RemoveAllItems but make sure the container you move to is in the same cell as the player when removing/giving back. (See the notes on the wiki page)Your script for this should be something like this: ObjectReference Property StorageContianer Auto  Event OnActivate(ObjectReference akActionRef) ;or use a different event to triggers this   Game.GetPlayer().RemoveAllItems(StorageContianer, True) EndEvent  To move it back use this: ObjectReference Property StorageContianer Auto  Event OnActivate(ObjectReference akActionRef) ;or use a different event to triggers this   StorageContianer.RemoveAllItems(Game.GetPlayer(), True) EndEvent Wow great, thanks for replying. I will try as soon as I get home.WithEvent OnActivate(ObjectReference akActionRef) do I paste it as is or make object reference a property? Thanks Link to comment Share on other sites More sharing options...
Cohagen Posted November 28, 2016 Author Share Posted November 28, 2016 (edited) For the activator script try this: Quest Property YourQuest Auto Event OnActivate(ObjectReference akActionRef) ÃÂ YourQuest.SetStage(20) EndEvent Add this script to your activator and make sure not to forget to fill the quest property.ÃÂ For storing the players items you can use RemoveAllItems but make sure the container you move to is in the same cell as the player when removing/giving back. (See the notes on the wiki page)Your script for this should be something like this: ObjectReference Property StorageContianer Auto ÃÂ Event OnActivate(ObjectReference akActionRef)ÃÂ ;or use a different event to triggers this ÃÂ ÃÂ Game.GetPlayer().RemoveAllItems(StorageContianer, True) EndEvent ÃÂ To move it back use this: ObjectReference Property StorageContianer Auto ÃÂ Event OnActivate(ObjectReference akActionRef)ÃÂ ;or use a different event to triggers this ÃÂ ÃÂ StorageContianer.RemoveAllItems(Game.GetPlayer(), True) EndEvent Wow great, thanks for replying. I will try as soon as I get home.WithEvent OnActivate(ObjectReference akActionRef) do I paste it as is or make object reference a property? Thanks Edit: Sorry for multiple posts, I'm not good doing this on the phone. Edited November 28, 2016 by Cohagen Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 28, 2016 Share Posted November 28, 2016 The OnActivate needs to be like it is written in my post don't change what's between the () Link to comment Share on other sites More sharing options...
Cohagen Posted November 28, 2016 Author Share Posted November 28, 2016 (edited) The OnActivate needs to be like it is written in my post don't change what's between the ()Sorry i was really hoping that would work, would you mind taking a look? Edited November 28, 2016 by Cohagen Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 28, 2016 Share Posted November 28, 2016 Try removing the "{ "before your quest property and the "}" after your EndEvent and also remove the second Quest property (last line) Link to comment Share on other sites More sharing options...
LoneRaptor Posted November 28, 2016 Share Posted November 28, 2016 If that doesn't work and the script is attached to the terminal in the render window. It might be because of that. I haven't tried using onActivate on a terminal before and don't have the time now. but if you want to set the stage when the player reads something on the terminal you can do this by adding a script fragment on the option. Start by Creating a property for your quest using the add property button in the properties menu. Then in the fragment you write MyQuest.SetStage(20).Otherwise you could use an activator like a button on the wall. and attach the script you already have to it. Link to comment Share on other sites More sharing options...
Cohagen Posted November 29, 2016 Author Share Posted November 29, 2016 (edited) If that doesn't work and the script is attached to the terminal in the render window. It might be because of that. I haven't tried using onActivate on a terminal before and don't have the time now. but if you want to set the stage when the player reads something on the terminal you can do this by adding a script fragment on the option. Start by Creating a property for your quest using the add property button in the properties menu. Then in the fragment you write MyQuest.SetStage(20).Otherwise you could use an activator like a button on the wall. and attach the script you already have to it. Just added the script to activator, not the render window, removed the changes made by the ck and now it works :yes:The transition to the minigame is seamless thanks for your help.Any idea if DisablePlayerControls Will not work in Fallout 4? I tried 'player.disablePlayerControls(abVATS = true)' but it come up with 'disablePlayerControls is not a function or does not exist'I would just like to know to save me chasing a dead horse. Edited November 29, 2016 by Cohagen Link to comment Share on other sites More sharing options...
Recommended Posts