Mktavish Posted March 18, 2020 Share Posted March 18, 2020 https://geckwiki.com/index.php?title=GetVATSValue Does anybody know how to use this , or if can use it in a script block ?MenuMode 1056 ; for example I can set it in a Perk / EntryPoint ... but that doesn't get me what I want ,Which is the reference target , so I can add a package to them. Here is a script I have been trying to make work , but the players movement controls are disabled during it , and that flag disables the crosshair , so am guessing is the reason this script doesn't work. Also I used "Set rTargetAquire to Player.GetCombatTarget"Which doesn't work either ... any thoughts ... anybody ?Anyways , here is the script , a Quest script started same time the player controls are disabled , with a .1 delay ~~~~~~~~~~~~~~~~~~~~~~~SCN zzzTestSatBeamSCRIPT Int iSetGSInt iSetTargetRef rTargetAquire Begin GameMode If iSetGS == 0 Con_SetGameSetting fVATSMaxEngageDistance 10000 Set iSetGS To 1 endifEnd Begin MenuMode 1056 If iSetGS == 1 && iSetTarget == 0 let rTargetAquire := ObjectUnderReticle 2000 10000 If rTargetAquire.IsInList INVBat01TroopList01 == 1 Set iSetTarget to 1 If IsKeyPressed 256 == 1 && iSetTarget == 1 rTargetAquire.AddScriptPackage zzzAddTestPack Set iSetTarget to 2 endif endif endifEND~~~~~~~~~~~~~~~~~~~~~~~~~ By the way ... VATS acquires the target just fine , and can even shoot them (nearly 10000 units away) But it is unreliable since I need it to always add a script package.Which by the way , will be from message buttons eventually , once I can see it actually add a script package. Link to comment Share on other sites More sharing options...
Mktavish Posted March 18, 2020 Author Share Posted March 18, 2020 Uh oh ... is this my problem ...https://geckwiki.com/index.php/AddScriptPackage You need an actual Ref-ID instead of a Ref variable ? (but the script saves)Therefore I should just give the base-ID's all the applicable packages , then a script on them holding variables for conditions on their packages.Then use this on them https://geckwiki.com/index.php?title=SetVariable Link to comment Share on other sites More sharing options...
GamerRick Posted March 19, 2020 Share Posted March 19, 2020 (edited) I have no idea, and the lack of info on the GetVATsXXXX commands doesn't help. I also can't figure out what you are trying to do there. Adding a script package to an NPC in VATS? No idea. The first time I saw the ObjectUnderReticle command was in JSawyer Ultimate, where it is used to change the inventory items of a dead NPC around. THe mod uses scripts for a lot of stuff. Edited March 19, 2020 by GamerRick Link to comment Share on other sites More sharing options...
Mktavish Posted March 20, 2020 Author Share Posted March 20, 2020 Thanks for your post ... was nice to have that atleast. :thumbsup: But yes you are correct ... trying to add an Ai package to a Vats target. Or target period from nearly 10000 units away ... with the player suspended above the terrain at 2500 units. Which requires I disable their movement control , ergo disables crosshair and any scope overlay. So very hard to hit them to bring up my addpackage message buttons since the projectile must strike them. Link to comment Share on other sites More sharing options...
GamerRick Posted March 20, 2020 Share Posted March 20, 2020 What if you put collision boxes around the player up there? Then you could enable the controls and they still couldn't move. Link to comment Share on other sites More sharing options...
Mktavish Posted March 20, 2020 Author Share Posted March 20, 2020 What if you put collision boxes around the player up there? Then you could enable the controls and they still couldn't move. That's funny ... I had just thought about that lately. It is next for testing / tomorro I'm not totally sure it will work , except to maybe first disable controls , then enable after arrival in the collision box.Since moving the player there without disablecontrols will make them arrive on the ground below that point. Thanks again for giving input :smile: Add edit: I see you did mention the changing of controls after location movement , sorry I missed that. But yes I think that may be the key . Link to comment Share on other sites More sharing options...
Mktavish Posted March 22, 2020 Author Share Posted March 22, 2020 What if you put collision boxes around the player up there? Then you could enable the controls and they still couldn't move. Fricken BoolYa .... works like a charm :thumbsup: I wanted a dynamic position based on the players. But that just aint gona work.Was stretching to far I guess , and realistically , the player only needs a few fixed positions to survey the battle field. Doesn't really matter if it's a bit this way or that on the X,Y axis. Thank ya much for the idea input :smile: Link to comment Share on other sites More sharing options...
Recommended Posts