Deleted2746547User Posted July 22, 2011 Share Posted July 22, 2011 Sometimes I feel like I am having a conversation with myself on the boards these days.. :( Anyhoo, I am curious (if anyone is listening... I mean reading)... how do i set a timer to an x marker to cause items to be placed over a period of time.. (and not just "appear" all at one).. for example.. lets say I fire an event that causes sandbags to be enabled and show up in a row... how would I attach a timer where each set up sandbags is placed sequentially one after another over time? To give the effect like its being built? how would you also tie an NPC to the activity... so, it in fact looks like he is builing it... any links to similar scripting would be helpful... thanks for the advice Link to comment Share on other sites More sharing options...
NorthWolf Posted July 22, 2011 Share Posted July 22, 2011 GECK Wiki - GetSecondsPassed. Link to comment Share on other sites More sharing options...
Glenstorm Posted July 22, 2011 Share Posted July 22, 2011 (edited) set startingDay to GameDaysPassed and set setToBuild to 1 when you want to start building. This should mimic the construction in 2 stages happening two days apart. This can be simplified a lot more but thats up to you. It's a pretty simple script, attach it to a quest or something and set the script update delay to something like every 12 in-game hours or so. scn MyBuildingScript float startingDay; float diff; float stage; float startingDay; short setToBuild; BEGIN GameMode if setToBuild == 1 set diff to ( GameDaysPassed - startingDay); if diff > 2 && stage == 0 set stage to 1; ;Enable all the first stage model references here elseif diff > 4 && stage == 1 set stage to 2; ;Enable all the second stage model references here set setToBuild to 0; endif endif END Edited July 22, 2011 by Glenstorm Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 22, 2011 Author Share Posted July 22, 2011 Thanks so much to both of you... and Glenstorm that helped A LOT! The mod I'm building (have a WIP uploaded on the boards)... is massive. The scripting part is killing me. thanks!! Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 22, 2011 Author Share Posted July 22, 2011 set startingDay to GameDaysPassed and set setToBuild to 1 when you want to start building. This should mimic the construction in 2 stages happening two days apart. This can be simplified a lot more but thats up to you. It's a pretty simple script, attach it to a quest or something and set the script update delay to something like every 12 in-game hours or so. scn MyBuildingScript float startingDay; float diff; float stage; float startingDay; short setToBuild; BEGIN GameMode if setToBuild == 1 set diff to ( GameDaysPassed - startingDay); if diff > 2 && stage == 0 set stage to 1; ;Enable all the first stage model references here elseif diff > 4 && stage == 1 set stage to 2; ;Enable all the second stage model references here set setToBuild to 0; endif endif END QUICK QUESTION... would it be possible to assign an NPC to "do" the work? that is, make it look like he is "working" on it piece by piece? thx! Link to comment Share on other sites More sharing options...
Glenstorm Posted July 22, 2011 Share Posted July 22, 2011 (edited) Well, yes. Theoretically yes. I have gone through the GECK files and all I could find in a quick run-through which looked like it might come useful to you are these: BoomerWeldingMarkerBoomerWorkingLowMarkerBoomerWorkingMidMarkerBoomerWorkingOverheadMarker Just place these around the building site and let loose a generic NPC around the area with a sandbox package. He/she should randomly play the Idles. I have no idea how the idles play though, I haven't gone to the Boomers yet in the play-through. So you might want to go through them to check which one best serves your purpose. Generic NPC package with Sandbox package:Copy of an existing generic NPC. Remove all factions from the Faction Tab, Remove all AI packages from the AI packages. Right click -> Add. Create a new Sandbox package and set it around editor location. Make sure the "Use Idle marker" is checked. Then observe in-game. Sorry I haven't done this in practice. I wish I knew how to play those idles in GECK. Edited July 22, 2011 by Glenstorm Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 22, 2011 Author Share Posted July 22, 2011 So question (THANK YOU for that) - would you attach the NPC (or ref) to the building quest...? so, when the quest was over, the builder disappeared? Link to comment Share on other sites More sharing options...
Glenstorm Posted July 22, 2011 Share Posted July 22, 2011 (edited) LOL, you took it the wrong way. The generic NPC is just an assist so that you can watch him play the idle and determine which marker is best for your construction. It's not meant to go with your mod. However, from what you say, if you want to create a random NPC who just exists to build it, this is the way to go:Create a new NPC and strip him of all faction and AI Packages.Right click -> New in the AI Package list.Create a new AI Package (Sandbox): Around editor location (Radius: 500).Under the Sandbox tab, in "Allowed Behaviours", uncheck everything except Conversations and Idle MarkersName the AI package and close the dialogNow place the NPC near where you want to set up the construction. Place some of the aforementioned Idle Markers near there too. Double Click the NPC and check "Initially Disabled" as well as "Persistent Reference". name the reference something like bbBuilder. scn MyBuildingScript float startingDay; float diff; float stage; float startingDay; short setToBuild; short npcVisible; BEGIN GameMode if setToBuild == 1 ;Enable the NPC if npcVisible == 0 bbBuilder.Enable set npcVisible to 1 endif set diff to ( GameDaysPassed - startingDay); if diff > 2 && stage == 0 set stage to 1; ;Enable all the first stage model references here elseif diff > 4 && stage == 1 set stage to 2; ;Enable all the second stage model references here ;Assuming this is the last stage. Destroy the NPC here bbBuilder.Disable bbBuilder.MarkForDelete set setToBuild to 0; endif endif END Now whenever you set it to build, the NPC should be visible as well, going around and playing the markers. Edited July 22, 2011 by Glenstorm Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 22, 2011 Author Share Posted July 22, 2011 (edited) PS On a related note.... if I have lots of items (junk, clutter, etc.) in a cell...and have a script/quest to clean it up (get rid of it and replace with different items).. woudl teh best way to handle that be to tie the "junk" to an x marker and the items be set enabled opp of parent.? or should I find a script to delete the item/ref. once the quest has been completed? (MarkForDelete?) for example.. I have an offfice and there is junk, clutter, etc.in it... a "quest" will give the player the option of "cleaning house" and all the junk will be removed. a second stage of the quest will put new tables, chairs, etc. where the old junk was.. (multiply this x's 4 or 5 buildings and the NCRCF compound... and that would leave a lot of useless "clutter" sitting in memory..? Edited July 22, 2011 by Guest Link to comment Share on other sites More sharing options...
Deleted2746547User Posted July 22, 2011 Author Share Posted July 22, 2011 LOL, you took it the wrong way. The generic NPC is just an assist so that you can watch him play the idle and determine which marker is best for your construction. It's not meant to go with your mod. However, from what you say, if you want to create a random NPC who just exists to build it, this is the way to go:Create a new NPC and strip him of all faction and AI Packages.Right click -> New in the AI Package list.Create a new AI Package (Sandbox): Around editor location (Radius: 500).Under the Sandbox tab, in "Allowed Behaviours", uncheck everything except Conversations and Idle MarkersName the AI package and close the dialogNow place the NPC near where you want to set up the construction. Place some of the aforementioned Idle Markers near there too. Double Click the NPC and check "Initially Disabled" as well as "Persistent Reference". name the reference something like bbBuilder. scn MyBuildingScript float startingDay; float diff; float stage; float startingDay; short setToBuild; short npcVisible; BEGIN GameMode if setToBuild == 1 ;Enable the NPC if npcVisible == 0 bbBuilder.Enable set npcVisible to 1 endif set diff to ( GameDaysPassed - startingDay); if diff > 2 && stage == 0 set stage to 1; ;Enable all the first stage model references here elseif diff > 4 && stage == 1 set stage to 2; ;Enable all the second stage model references here ;Assuming this is the last stage. Destroy the NPC here bbBuilder.Disable bbBuilder.MarkForDelete set setToBuild to 0; endif endif END Now whenever you set it to build, the NPC should be visible as well, going around and playing the markers. You are the man! I will try to see if I can put that in - MAJOR THANKS! Link to comment Share on other sites More sharing options...
Recommended Posts