sleekblind Posted September 25, 2013 Share Posted September 25, 2013 I am trying to implement a script that hides a companion's caps until they die, so that the player can't just steal it all after the companion gets paid for services, and yet those caps CAN at some point be retrieved. So far, this is what it looks like. short DoOnceshort CapStash ;____________________________________________ BEGIN GameMode ;____________________________________________ If ( DoOnce == 0 ) Set CapStash to 100 Set DoOnce to 1;_____________________________________________ if ( HazelREF.GetItemCount Caps001 >= 100 ) HazelREF.RemoveItem caps001 100 set CapStash to CapStash +100 EndIf;_____________________________________________ END BEGIN OnDeath ;_____________________________________________ HazelREF.Additem Caps001 Capstash;_____________________________________________ END With this last line I have tried CapStash*1, (CapStash*1), CapStash, all trying to add a number of caps equal to the value of the CapStash variable. Nothing seems to work. I only have one cycle OnDeath to make it happen, so it needs to be some kind of multiplication. Do I need to set CapStash to a new variable before I can multiply it? What is going on? Link to comment Share on other sites More sharing options...
sleekblind Posted September 25, 2013 Author Share Posted September 25, 2013 (edited) I use a similar script to add playable versions of her equipment after she dies, then remove the non-playable versions. Is it just simply not possible to add caps to a NPC during the OnDeath segment? Because the equipment gets added and removed flawlessly running the same script, minus the attempt at multiplication. Edited September 25, 2013 by sleekblind Link to comment Share on other sites More sharing options...
sleekblind Posted September 25, 2013 Author Share Posted September 25, 2013 I also tried making a secondary inventory, moving the caps there and moving them back OnDeath. I actually had a 3rd inventory for player item storage, which transferred everything flawlessly- but the 2nd inventory failed to transfer the caps. It seems like caps just don't like being moved OnDeath. Link to comment Share on other sites More sharing options...
sleekblind Posted September 25, 2013 Author Share Posted September 25, 2013 (edited) It just occurred to me to test this, and the 3rd inventory fails to transfer any caps stored in it- only the items are moved OnDeath. Using a container, as one would for a merchant, also failed to transfer caps OnDeath. Edited September 25, 2013 by sleekblind Link to comment Share on other sites More sharing options...
sleekblind Posted September 25, 2013 Author Share Posted September 25, 2013 (edited) Maybe I will just add a container somewhere and move the caps there, and leave a note on her corpse to give the player a little side-quest to find her stash. It doesn't really make sense that a companion would have time to constantly hide things if they are following you, but... meh. Edited September 25, 2013 by sleekblind Link to comment Share on other sites More sharing options...
sleekblind Posted September 25, 2013 Author Share Posted September 25, 2013 I wonder if faction currency would work instead? Link to comment Share on other sites More sharing options...
sleekblind Posted September 25, 2013 Author Share Posted September 25, 2013 I ended up just converting the caps to NCR $100 bills at a 40:1 rate as I removed them, and they transfer flawlessly OnDeath. It seems Caps just can't be added to a corpse? Link to comment Share on other sites More sharing options...
Polyfemus Posted September 25, 2013 Share Posted September 25, 2013 That is so weird. Well the Geck works in odd ways some things that seemingly should work as intended doesn't. Link to comment Share on other sites More sharing options...
rickerhk Posted September 26, 2013 Share Posted September 26, 2013 Yeah that is weird. Did you try just adding the caps in the gamemode section - it still runs on a dead actorif HazelREF.GetDead && DoOnce == 1 HazelREF.Additem Caps001 Capstash set DoOnce to 2endif Link to comment Share on other sites More sharing options...
sleekblind Posted October 8, 2013 Author Share Posted October 8, 2013 Yeah I did try that, sorry about the late reply. Link to comment Share on other sites More sharing options...
Recommended Posts