ghostrecon123 Posted May 16, 2012 Share Posted May 16, 2012 (edited) hello, i need help with a script ok, so i created a script that makes you taller when you wear Power Armor but setting a player's scale also increases damage so i made a perk that gets added to you by the script that reduces damage to 90% because i set player scale to 110% to balance it and i made this script scn TallerPowerArmorScript begin onequipsetscale 1.1AddPerk TallerPowerArmorPerkend begin onunequipsetscale 1RemovePerk TallerPowerArmorPerkend and then i added the script to power armorsso i then i tested it out in-game, i wore a t-45 then i got taller so i thought woot it worked! then i gave one to my companion but she didn't get tallerso now my problems is how to make this mod affect NPCs? thanks in advance and sorry for bothering anyone Edited May 16, 2012 by ghostrecon123 Link to comment Share on other sites More sharing options...
b3w4r3 Posted May 16, 2012 Share Posted May 16, 2012 Does this add the perk to you? Seems like you are running the functions on the armor not the wearer. Try setting a reference variable like "set me to getcontainer", then use me to run your functions against. me.setscale 1.1me.AddPerk TallerPowerArmorPerk You might also try setsize as opposed to setscale. Pretty sure setscale doesn't update the collision to match the new dimensions. Link to comment Share on other sites More sharing options...
Cyberlazy Posted May 16, 2012 Share Posted May 16, 2012 (edited) b3w4r3: And setsize does? Hmm. Looks like setsize requires a 'size' and not a scale factor however. I just disable and enable the NPC to reset its collision data. Edited May 16, 2012 by Cyberlazy Link to comment Share on other sites More sharing options...
ghostrecon123 Posted May 17, 2012 Author Share Posted May 17, 2012 (edited) On 5/16/2012 at 6:10 PM, b3w4r3 said: Does this add the perk to you? i re-tested it and it turned out it doesn't add the perk on my character so i wrote the script like this scn TallerPowerArmorScript begin onequipplayer.setscale 1.1player.AddPerk TallerPowerArmorPerkend begin onunequipplayer.setscale 1player.RemovePerk TallerPowerArmorPerkend so then i tested it and now i get the perk and get taller but when i make other NPCs wear it they still don't get taller, is there a command that targets all NPCs instead of just the player? like replacing "player".addperk with something else that targets all NPCs that wear the armor? i don't know much on this because i suck at scripting EDIT: setsize doesn't seem to work both on the script and on in-game console, atleast on my end and i don't understand what you meant by this (Try setting a reference variable like "set me to getcontainer", then use me to run your functions against. me.setscale 1.1me.AddPerk TallerPowerArmorPerk) because i don't know much about scripting Edited May 17, 2012 by ghostrecon123 Link to comment Share on other sites More sharing options...
b3w4r3 Posted May 17, 2012 Share Posted May 17, 2012 Like this... scn TallerPowerArmorScript ref me begin onequip set me to getcontainer me.setscale 1.1 me.AddPerk TallerPowerArmorPerk end begin onunequip me.setscale 1 me.RemovePerk TallerPowerArmorPerk end I was afraid setsize might not work, I only tried it in console and when it didn't work I thought maybe it only worked in a script. I'll have to do some testing with the function. Link to comment Share on other sites More sharing options...
ghostrecon123 Posted May 17, 2012 Author Share Posted May 17, 2012 the script works only half way like mine did, i get taller and i get the perk but it still doesn't work on other NPCs, anyway i just decided to drop the whole mod, just gave up on it, scripting was never my favorite part anyway, thank you very much for helping, +1 kudos for you Link to comment Share on other sites More sharing options...
Cyberlazy Posted May 17, 2012 Share Posted May 17, 2012 Oh, btw, perks don't work on NPC's afaik. You'll have to use a script effect or object effect or something. Link to comment Share on other sites More sharing options...
ghostrecon123 Posted May 18, 2012 Author Share Posted May 18, 2012 On 5/17/2012 at 8:03 PM, Cyberlazy said: Oh, btw, perks don't work on NPC's afaik. You'll have to use a script effect or object effect or something.its ok with me if perks don't work on NPCs, it'll just make power armored NPCs 10% stronger and for me its a good thing, but if only i could make power armored NPCs 10% taller without manually editing all their scales one by one, i just stopped on the mod anyway Link to comment Share on other sites More sharing options...
Cyberlazy Posted May 18, 2012 Share Posted May 18, 2012 You can, you just need to use a script effect spell and not a perk. Link to comment Share on other sites More sharing options...
Recommended Posts