I followed the directions precisely adding my custom perk, and the script is letting me buy the perk over and over until I max out my perk slots. I tried adding in manual checks to not let this happen for example:
Code Snippet
Plaintext
function give_custom_perk() { // quick revive in solo gives an extra life // give perk here if(isdefined(self.hasFreezePerk) && self.hasFreezePerk == true) //Here is the check I make to stop spam buying break; self SetPerk("specialty_freeze"); self.hasFreezePerk = true; self.has_custom_perks++; self thread freeze_perk_shader::add_custom_perk_shader( self, "e115_vial_empty_shader" ); // CHANGE THIS TO YOUR PERK SHADER trigger = GetEnt("specialty_freeze", "target"); // CHANGE THIS TO YOUR PERK MACHINE NAME trigger SetHintStringForPlayer(self, ""); trigger SetInvisibleToPlayer(self);
}
I can't seem to remedy this issue, and I noticed on the original post shinged did not reply to this issue that two other members complained about, so hopefully someone else can provide some insight on why this is happening. The perk works fine, I can buy it, drink the bottle, and the perk effect is working, only issue being the ability to spam buy it.
EDIT* - After the check I make in this function, it still lets me spam buy the perk, but it will only show 1 perk shader. So the trigger is active for me until I have max perks.
Last Edit: May 22, 2017, 07:20:09 pm by Archaicvirus
I just reviewed the tutorial again, it doesn't seem to address the 'specialties' you mentioned. Maybe I'm just missing something. I think I get what you're saying though, but can you tell me how to go about setting my perk up as a specialty_whatever, as in what function would I call to set the perk as a specialty_whatever
*EDIT Oh so you mean when I do
Code Snippet
Plaintext
player SetPerk("specialty_choose_from_your_list")
?
Last Edit: May 22, 2017, 11:11:41 pm by Archaicvirus
I just reviewed the tutorial again, it doesn't seem to address the 'specialties' you mentioned. Maybe I'm just missing something. I think I get what you're saying though, but can you tell me how to go about setting my perk up as a specialty_whatever, as in what function would I call to set the perk as a specialty_whatever
*EDIT Oh so you mean when I do
Code Snippet
Plaintext
player SetPerk("specialty_choose_from_your_list")
?
That was my idea, yeah, not sure if that is your issue or not. It prob should match what is on the machine too.
whenever i made a perk (and ive made around 10 in bo3 so far) i never used anything like that and they all worked. i havent made one in a little while but i found this in the scripts for them, might be the fixer
whenever i made a perk (and ive made around 10 in bo3 so far) i never used anything like that and they all worked. i havent made one in a little while but i found this in the scripts for them, might be the fixer
its at the bottom of the function that gives the perk (with the setperk and stuff)
This fixed the issue. I of course changed PERK_ANGEL to what I set in the GSH. Thanks man. And MC - thank you again also for the input. I'll tell shinged about this fix, so he can update his tutorial. That way people aren't beating their head against a wall like me for hours.