Nexusmodsaccountno2 Posted November 22, 2018 Share Posted November 22, 2018 I see additem as a function but no addcontainer...Just wondering how I would go about making a container spawn ingame at the player's feet? Link to comment Share on other sites More sharing options...
uhmattbravo Posted November 22, 2018 Share Posted November 22, 2018 You probably want placeatme: http://geck.bethsoft.com/index.php?title=PlaceAtMe Link to comment Share on other sites More sharing options...
dubiousintent Posted November 22, 2018 Share Posted November 22, 2018 You might want to refer to the community GECKWiki page on the "PlaceAtMe" function. In particular the "Caution" and "Notes" sections. I didn't compare them to see if there are any differences, but the GECKWiki is more likely to be updated than the "official" Bethsoft version. -Dubious- Link to comment Share on other sites More sharing options...
Nexusmodsaccountno2 Posted November 23, 2018 Author Share Posted November 23, 2018 Yup looks like it is what I need, I will give it a shot. Thanks! Link to comment Share on other sites More sharing options...
Nexusmodsaccountno2 Posted November 28, 2018 Author Share Posted November 28, 2018 Ok new problem... The place at me function to get a container spawned at the player is tested and working but I am having trouble compiling the next part of the script PlayerRef.PlaceAtMe ContainerRef01 ;works great, spawns the specified container at the player but....PlayerRef.RemoveAllItems ContainerRef01 1 1 ; up to "PlayerRef.RemoveAllItems" compiles but when I add the containerref01 it stops the script from compiling I want all player inventory transferred to the "placeatme" created container but the script is not compiling. Any ideas as to why? Doing some research I see that it might be an issue defining a persistant reference? But as I am using placeatme I am at a loss as to how to get the player's items into a newly spawned container... Link to comment Share on other sites More sharing options...
dubiousintent Posted November 28, 2018 Share Posted November 28, 2018 As I understand it, you need to initially place a "persistent reference" container somewhere hidden in the world first. (Without "persistence" you don't have an "non-dynamic" "RefID".) Then you use that "RefID" (i.e. ContainerRef01") with your "PlaceAtMe" function and in the "RemoveAllItems" function. When you are done with it, you can "MoveTo" it back to the hidden location (an XMarker) in order to "rinse-and-repeat" as needed. -Dubious- Link to comment Share on other sites More sharing options...
uhmattbravo Posted November 28, 2018 Share Posted November 28, 2018 If you specifically need a non persistent ref, stick something like this on the container: Short CurrentActionRef ContainerRef Begin GameMode If CurrentAction == 0 Set ContainerRef to getself Set CurrentAction to 1 Elseif CurrentAction == 1 Player.removeallitems ContainerRef Set CurrentAction to 2 Endif Otherwise if it doesn't really need to be a non persistent ref, name it, hide it somewhere and use moveto instead like Dubious said. Link to comment Share on other sites More sharing options...
dubiousintent Posted November 29, 2018 Share Posted November 29, 2018 Thanks. Added 'TIP: Referencing Objects' to "Scripting" section of the wiki "Getting started creating mods using GECK" article. -Dubious- Link to comment Share on other sites More sharing options...
Nexusmodsaccountno2 Posted November 29, 2018 Author Share Posted November 29, 2018 (edited) I will try both methods and see what works thanks! edit: deleted a bunch of questions, in the middle of testing stuff out and seeing what's what. Edited November 29, 2018 by Nexusmodsaccountno2 Link to comment Share on other sites More sharing options...
Nexusmodsaccountno2 Posted November 30, 2018 Author Share Posted November 30, 2018 Moveto works perfectly without the bloat to save games that placeatme can cause. Made a dummy cell, placed a container in it, then used moveto to get the container to the player. Thanks for the help. Link to comment Share on other sites More sharing options...
Recommended Posts