Crosstieger Posted March 20, 2017 Share Posted March 20, 2017 Can somebody explain to me, how to correctly use this function? https://www.creationkit.com/fallout4/index.php?title=SwitchToPowerArmor_-_Actor ; Snap the dude into awesome armor TheDude.SwitchToPowerArmor(AwesomeArmor) I tried it with this little script, but I get the error "type mismatch on parameter 1 - cannot pass a furniture to a objectreference". Scriptname VR_Chair extends ObjectReference Const Furniture Property VR_Furniture Auto Const Event OnActivate(ObjectReference akActionRef) Game.GetPlayer().SwitchToPowerArmor(VR_Furniture) EndEvent The wiki even states "aArmorFurniture: The inactive armor furniture to snap this actor into." Link to comment Share on other sites More sharing options...
shavkacagarikia Posted March 21, 2017 Share Posted March 21, 2017 That aArmorFurniture must be power armor in which you are trying to move your character. Link to comment Share on other sites More sharing options...
Crosstieger Posted March 21, 2017 Author Share Posted March 21, 2017 That aArmorFurniture must be power armor in which you are trying to move your character. Well, aArmorFurniture is referring to a furniture that has the keyword "FurnitureTypePowerArmor" ... http://tm-kirsche.square7.ch/fallout/vr.JPG http://tm-kirsche.square7.ch/fallout/vr2.JPG Link to comment Share on other sites More sharing options...
shavkacagarikia Posted March 21, 2017 Share Posted March 21, 2017 (edited) Yes power armors are basically furnitures for game as I know. So what is exactly your VR_furniture? If thats not power armor the function probably wont work Edited March 21, 2017 by shavkacagarikia Link to comment Share on other sites More sharing options...
vkz89q Posted March 21, 2017 Share Posted March 21, 2017 I might be wrong so just a guess here, but the power armor needs to be in the world, then you pass it's object reference to the function, and it snaps you in to the armor. I don't think it's magically gonna summon power armor and then snap your npc/player to it. I'm not sure what you are trying to do but, you could maybe use PlaceAtMe function to summon disabled power armor, then snap+enable it? Like I said, I'm not sure what you are trying to do. Is the power armor already placed in the world? Or are you trying to snap yourself to last used power armor? Tell us what are you trying to do. Link to comment Share on other sites More sharing options...
Crosstieger Posted March 21, 2017 Author Share Posted March 21, 2017 Ok I got it to work. My issue was that I was mistaken on how this function works. I was confused by the statement of the wiki saying " ... the inactive furniture ... " when it actually means " ... the inactive power armor INGAME ... ". So yes, you need to pass the power armor that is already placed in the world. Here’s what the script looks like now: Scriptname VR_Chair extends ObjectReference Const ObjectReference Property VR_PowerArmor Auto Const Event OnActivate(ObjectReference akActionRef) Debug.MessageBox("Betrete Powerrüstung in 5 Sekunden...") Utility.Wait(5.0) Game.GetPlayer().SwitchToPowerArmor(VR_PowerArmor) EndEvent The property passes the ref ID of a power armor already placed in the word. You learn something new every day. What I try to achieve is: You press a button, of some sort, and then you get placed in a specific power armor that could be located anywhere in the world. Kinda like a remote control. Link to comment Share on other sites More sharing options...
Recommended Posts