WyrdOh Posted January 7, 2009 Share Posted January 7, 2009 I'm currently messing around with making my own pack of perks, taking a bit of inspiration from the excellent UPP, and I've hit a little bit of a hitch. I'm trying to find a way to make a perk only activate it's benefits when an nearby ally is under a certain value of health, but I can't seem to see a way. :wallbash: Is there a pre-programmed way to do with in the G.E.C.K or would it need a bit of expertise on the part of someone who actually knows what the hell they're doing? Link to comment Share on other sites More sharing options...
sumoftwosins Posted January 7, 2009 Share Posted January 7, 2009 I'm currently messing around with making my own pack of perks, taking a bit of inspiration from the excellent UPP, and I've hit a little bit of a hitch. I'm trying to find a way to make a perk only activate it's benefits when an nearby ally is under a certain value of health, but I can't seem to see a way. :wallbash: Is there a pre-programmed way to do with in the G.E.C.K or would it need a bit of expertise on the part of someone who actually knows what the hell they're doing? Probably what you will need to do is have a perk and an actor effect that works together. You create the perk to give the player the idea that the effect is always present, but really it does nothing. Then you have an actor effect that is scripted to turn on and off based on your conditions. Otherwise you'd most likely have to add and remove the perk during the situations which require. If that is the case, then the player might freak out if the perk disappears. How to exactly tie it to another NPC's health might be a separate challenge in itself. So I guess somewhere you will add a script that says If NPC's health < X amount, check to see if player has your perk. If true, add the actor effect to player, else do nothing. If NPC's health > X amount, check again, but to remove actor effect. Link to comment Share on other sites More sharing options...
WyrdOh Posted January 7, 2009 Author Share Posted January 7, 2009 That sounds complicated enough to be a challenge to figure out for myself, thanks for the help ;D Link to comment Share on other sites More sharing options...
WyrdOh Posted January 8, 2009 Author Share Posted January 8, 2009 Sorry for the double post but I thought this was a little better than starting a new thread. This is the script I've come up with so far which I'm going to test when I get the chance, but I just wanted to clarify that it's going to do what I want it to do. I'm pasting it into the middle of all the followers scripts so that it'll only work with them, since I can't find any sort of universal script to get it to work with temporary followers too. If there is one, please point me in the right direction. (I realise the Myself ref is probably extraneous, but I'm just using it to help get my head around references and what-not :)) BEGIN GameMode ref Myself set Myself to GetSelf if ( Myself.GetPlayerTeammate == 1 ) if ( Player.HasPerk WyrdNoneLeftBehind == 1 ) if ( Player.HasPerk WyrdHIDDENNoneLeftBehind == 0 ) if ( Myself.GetHealthPercentage <= 0.50 ) Player.AddPerk WyrdHIDDENNoneLeftBehind endif endif endif if ( Player.HasPerk WyrdHIDDENNoneLeftBehind == 1 ) if ( Myself.GetHealthPercentage > 0.50 ) Player.RemovePerk WyrdHIDDENNoneLeftBehind endif endif endif END What I assume this does is check to see if the script-holder is the player's team mate, and if they are and are under 50% health, they give the player the bonuses for the perk they purchased (which grants nothing) by giving them another hidden version of the perk that actually grants bonuses. Then, if their health ever goes back above 50%, it will remove the hidden perk. I do have another question too; does setting a perk to Hidden in it's attributes also hide the benefits it gives in the effect screen of the PipBoy? *EDIT* Nevermind, checked that myself against the Well Rested perk :) *EDIT 2* Bleh, anyone know how to make a script set an NPC's confidence level? No value I give seems to make the script editor happy :( Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.