UGX-Mods Login

or login with an authentication provider below
Sign In with Google
Sign In with Twitter
Sign In with Discord
Sign In with Steam
Sign In with Facebook
Sign In with Twitch

Help with custom perk

broken avatar :(
Created 10 years ago
by Dust
0 Members and 1 Guest are viewing this topic.
3,018 views
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Signature
Donate to me if you enjoy my work. https://www.paypal.me/thezombiekilla6
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
So I am trying to make my first custom perk and i tried 2 different ways both of which did not work. Basically what the perk is suppose to do is be constant double points(similar to double dew except you get 20 for a hitmarker also)  and like i said i tried 2 different ways, buying the perk works fine its just the effect of it i tried this way by looking at bamskaters black ops perks script

Code Snippet
Plaintext
double_points()
{
while(1)
{
if(self hasperk("specialty_leadfoot"))
{
self
    set_zombie_var( "zombie_score_kill", 100 );
set_zombie_var( "zombie_score_damage", 10 );
set_zombie_var( "zombie_score_bonus_melee", 160 );
set_zombie_var( "zombie_score_bonus_head", 100 );
set_zombie_var( "zombie_score_bonus_neck", 40 );
set_zombie_var( "zombie_score_bonus_torso", 20 );
set_zombie_var( "zombie_score_bonus_burn", 20 );
}
else
{
self
    set_zombie_var( "zombie_score_kill", 50 );
set_zombie_var( "zombie_score_damage", 5 );
set_zombie_var( "zombie_score_bonus_melee", 80 );
set_zombie_var( "zombie_score_bonus_head", 50 );
set_zombie_var( "zombie_score_bonus_neck", 20 );
set_zombie_var( "zombie_score_bonus_torso", 10 );
set_zombie_var( "zombie_score_bonus_burn", 10 );
}
}
}

That gives me 130 for a kill without the perk(which is weird because 130 isnt even any of the numbers) then it gives me 50 points plus the 10 for hitmarkers after i buy the perk and it makes my knife super op (1 hit on round 6)

The other way i tried was i added it in zombiemode like this

Code Snippet
Plaintext
if(self hasperk("specialty_leadfoot"))
{
    set_zombie_var( "zombie_score_kill", 100 );
set_zombie_var( "zombie_score_damage", 10 );
set_zombie_var( "zombie_score_bonus_melee", 160 );
set_zombie_var( "zombie_score_bonus_head", 100 );
set_zombie_var( "zombie_score_bonus_neck", 40 );
set_zombie_var( "zombie_score_bonus_torso", 20 );
set_zombie_var( "zombie_score_bonus_burn", 20 );
}
else
{
set_zombie_var( "zombie_score_kill", 50 );
set_zombie_var( "zombie_score_damage", 5 );
set_zombie_var( "zombie_score_bonus_melee", 80 );
set_zombie_var( "zombie_score_bonus_head", 50 );
set_zombie_var( "zombie_score_bonus_neck", 20 );
set_zombie_var( "zombie_score_bonus_torso", 10 );
set_zombie_var( "zombie_score_bonus_burn", 10 );
}

And that one gives me double points with or without the perk but it only happens at random times, like some times when i dont have the perk it will give me 10 then other times it will give me 20 same thing with like a melee kill or something. Can anyone help me out?
This topic contains a post which is marked as the Best Answer. Click here to view it.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
Have you checked out this:
Tutorial Buyable Perks double Points Inska Kill

I dont want it to be a powerup, i want it to be a perk
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
I dont want it to be a powerup, i want it to be a perk

I hear ya.

Do you have this script in _zombiemode_score? In there it gives the player there points, around line 60 something.
Code Snippet
Plaintext
self.score += pioints;

Could you just add an if has perk there and do what you want to the points?
Code Snippet
Plaintext
if(self hasperk("specialty_leadfoot")){
        points = points * 2;
}

Or edit for each type of kill up above these lines?
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
on the case=damage, i am guessing thats for hitmarkers i added this
Code Snippet
Plaintext
case "damage":
points = level.zombie_vars["zombie_score_damage"];
if(self hasperk("specialty_leadfoot"))
{
        points = points * 2;
                 }

but that gives me 130 points for a kill without the perk and with the perk i only get 50, but still get the normal 10 points for a hitmarker, also it makes my knife super op with the perk which is weird because i didnt change anything to do with knifing
Last Edit: April 18, 2014, 06:19:04 pm by thezombiekilla6
Marked as best answer by thezombiekilla6 10 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
on the case=damage, i am guessing thats for hitmarkers i added this
Code Snippet
Plaintext
case "damage":
points = level.zombie_vars["zombie_score_damage"];
if(self hasperk("specialty_leadfoot"))
{
        points = points * 2;
                 }

but that gives me 130 points for a kill without the perk and with the perk i only get 50, but still get the normal 10

130 is for melee kill, 80 for melee, 50 for kill. I tested this before posting. It gave me double points on all zombie damage using the "specialty_quickrevive", but I had it down before this line:
Code Snippet
Plaintext
self.score+=points
It gave me 260 for knives, 100 for kills after I had quick revive, and so on. If you want to see if your code is being used where you put it, just add an
Code Snippet
Plaintext
iprintln("I am using this");
You should probably check and see if your player has "specialty_leadfoot" also.
broken avatar :(
×
broken avatar :(
The King of Zombies
Location: usLouisiana
Date Registered: 24 June 2013
Last active: 4 years ago
Posts
2,148
Respect
Forum Rank
King of the Zombies
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
Dust's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Dust's Contact & Social LinksMrZ0mbiesFanaticdust103194MrZ0mbiesFanatic
130 is for melee kill, 80 for melee, 50 for kill. I tested this before posting. It gave me double points on all zombie damage using the "specialty_quickrevive", but I had it down before this line:
Code Snippet
Plaintext
self.score+=points
It gave me 260 for knives, 100 for kills after I had quick revive, and so on. If you want to see if your code is being used where you put it, just add an
Code Snippet
Plaintext
iprintln("I am using this");
You should probably check and see if your player has "specialty_leadfoot" also.

nice. it works perfectly. now i have 2 custom perks in my map :D

 
Loading ...