I'm not a great scripter so and I'm not really sure what else to try :( Thanks for any help in advance :)
ModmeBot:
Reply By: m1cke Thats from _zm.gsc isen't it?
ModmeBot:
Reply By: Blink-420
m1ckeThats from _zm.gsc isen't it?
Yes
ModmeBot:
Reply By: m1cke i have heard that u can't edit _zm.gsc unfortunently :(
ModmeBot:
Reply By: Blink-420
m1ckei have heard that u can't edit _zm.gsc unfortunently :(
Well I'm not editing that .gsc, I referred to the _zm.gsc for help. Its in my own script, so I just need to figure out how to enable double points while the player has this perk. The perk works, the shader and everything, it just doesnt do anything right now until I get this figured out
ModmeBot:
Reply By: m1cke
Blink-420
m1ckei have heard that u can't edit _zm.gsc unfortunently :(
Well I'm not editing that .gsc, I referred to the _zm.gsc for help. Its in my own script, so I just need to figure out how to enable double points while the player has this perk. The perk works, the shader and everything, it just doesnt do anything right now until I get this figured out
Don't think you can do that to.
ModmeBot:
Reply By: m1cke btw blink if u do get it working why not release it would be cool
ModmeBot:
Reply By: Blink-420 UPDATE, I have the script working... but after getting one kill with double points it goes back to normal points.. this is the script
functioncheckCustomPerk(){while(1){if(self.hasCustomPerk==true){zombie_utility::set_zombie_var("zombie_score_damage_normal",20);// points gained for a hit with a non-automatic weaponzombie_utility::set_zombie_var("zombie_score_damage_light",10);// points gained for a hit with an automatic weaponzombie_utility::set_zombie_var("zombie_score_bonus_melee",120);// Bonus points for a melee killzombie_utility::set_zombie_var("zombie_score_bonus_head",100);// Bonus points for a head shot killzombie_utility::set_zombie_var("zombie_score_bonus_neck",80);// Bonus points for a neck shot killzombie_utility::set_zombie_var("zombie_score_bonus_torso",50);// Bonus points for a torso shot killzombie_utility::set_zombie_var("zombie_score_bonus_burn",50);// Bonus points for a burn killzombie_utility::set_zombie_var("zombie_score_kill_4player",150);//Base points for a kill with 4 playerszombie_utility::set_zombie_var("zombie_score_kill_3player",150);//Base points for a kill with 3 playerszombie_utility::set_zombie_var("zombie_score_kill_2player",150);//Base points for a kill with 2 playerszombie_utility::set_zombie_var("zombie_score_kill_1player",150);//Base points for a kill with 1 player}else{break;}wait(0.01);}}
ModmeBot:
Reply By: m1cke
Blink-420UPDATE, I have the script working... but after getting one kill with double points it goes back to normal points.. this is the script
functioncheckCustomPerk(){while(1){if(self.hasCustomPerk==true){zombie_utility::set_zombie_var("zombie_score_damage_normal",20);// points gained for a hit with a non-automatic weaponzombie_utility::set_zombie_var("zombie_score_damage_light",10);// points gained for a hit with an automatic weaponzombie_utility::set_zombie_var("zombie_score_bonus_melee",120);// Bonus points for a melee killzombie_utility::set_zombie_var("zombie_score_bonus_head",100);// Bonus points for a head shot killzombie_utility::set_zombie_var("zombie_score_bonus_neck",80);// Bonus points for a neck shot killzombie_utility::set_zombie_var("zombie_score_bonus_torso",50);// Bonus points for a torso shot killzombie_utility::set_zombie_var("zombie_score_bonus_burn",50);// Bonus points for a burn killzombie_utility::set_zombie_var("zombie_score_kill_4player",150);//Base points for a kill with 4 playerszombie_utility::set_zombie_var("zombie_score_kill_3player",150);//Base points for a kill with 3 playerszombie_utility::set_zombie_var("zombie_score_kill_2player",150);//Base points for a kill with 2 playerszombie_utility::set_zombie_var("zombie_score_kill_1player",150);//Base points for a kill with 1 player}else{break;}wait(0.01);}}
Really weird ur looping the script so maybe add a customperkthink function and just have it checking if the player gets the abbility or not.
ModmeBot:
Reply By: Blink-420 Well now its working, but it's giving all players double points.. not just the player with the perk.. this is my script now
functioncheckCustomPerk2(){while(1){if(self.hasCustomPerk==true){zombie_utility::set_zombie_var("zombie_score_damage_normal",20);// points gained for a hit with a non-automatic weaponzombie_utility::set_zombie_var("zombie_score_damage_light",10);// points gained for a hit with an automatic weaponzombie_utility::set_zombie_var("zombie_score_bonus_melee",40);// Bonus points for a melee killzombie_utility::set_zombie_var("zombie_score_bonus_head",75);// Bonus points for a head shot killzombie_utility::set_zombie_var("zombie_score_bonus_neck",60);// Bonus points for a neck shot killzombie_utility::set_zombie_var("zombie_score_bonus_torso",50);// Bonus points for a torso shot killzombie_utility::set_zombie_var("zombie_score_bonus_burn",50);// Bonus points for a burn killzombie_utility::set_zombie_var("zombie_score_kill_4player",75);//Base points for a kill with 4 playerszombie_utility::set_zombie_var("zombie_score_kill_3player",75);//Base points for a kill with 3 playerszombie_utility::set_zombie_var("zombie_score_kill_2player",75);//Base points for a kill with 2 playerszombie_utility::set_zombie_var("zombie_score_kill_1player",75);//Base points for a kill with 1 player}else{zombie_utility::set_zombie_var("zombie_score_damage_normal",10);// points gained for a hit with a non-automatic weaponzombie_utility::set_zombie_var("zombie_score_damage_light",10);// points gained for a hit with an automatic weaponzombie_utility::set_zombie_var("zombie_score_bonus_melee",60);// Bonus points for a melee killzombie_utility::set_zombie_var("zombie_score_bonus_head",50);// Bonus points for a head shot killzombie_utility::set_zombie_var("zombie_score_bonus_neck",40);// Bonus points for a neck shot killzombie_utility::set_zombie_var("zombie_score_bonus_torso",25);// Bonus points for a torso shot killzombie_utility::set_zombie_var("zombie_score_bonus_burn",25);// Bonus points for a burn killzombie_utility::set_zombie_var("zombie_score_kill_4player",50);//Base points for a kill with 4 playerszombie_utility::set_zombie_var("zombie_score_kill_3player",50);//Base points for a kill with 3 playerszombie_utility::set_zombie_var("zombie_score_kill_2player",50);//Base points for a kill with 2 playerszombie_utility::set_zombie_var("zombie_score_kill_1player",50);//Base points for a kill with 1 player}wait(0.01);}}
ModmeBot:
Reply By: natesmithzombies You may be able to do this much simpler than you are attempting. Call the init_doublePoint_perk() function as soon as you can, you could even do so in mapname.gsc by pasting these functions at the bottom of it and threading as usual. It would be cleaner to do this all in your perk script though:
The simplicity of this script has drawbacks. You will notice I am adding to players score when I should be doing player_points*2 instead. This is because there appears to be a different check for a pers_upgrade_pistol_points right after. I imagine that is not there for no reason so it is crucial to add points immediately to the player's score otherwise the double points will be overwritten. Additionally by adding to player score twice the points will not be doubled in the same way that double points does it i.e it will show up twice on the hud +100 +100 for 200 instead of +200. This could all be cleaner if we can edit stock scripts, which we cant :( lol
All of this is untested so let me know if it works out for you. Scripting is an art of simplicity and brevity, keep your code short if you can
ModmeBot:
Reply By: Blink-420
natesmithzombiesYou may be able to do this much simpler than you are attempting. Call the init_doublePoint_perk() function as soon as you can, you could even do so in mapname.gsc by pasting these functions at the bottom of it and threading as usual. It would be cleaner to do this all in your perk script though:
The simplicity of this script has drawbacks. You will notice I am adding to players score when I should be doing player_points*2 instead. This is because there appears to be a different check for a pers_upgrade_pistol_points right after. I imagine that is not there for no reason so it is crucial to add points immediately to the player's score otherwise the double points will be overwritten. Additionally by adding to player score twice the points will not be doubled in the same way that double points does it i.e it will show up twice on the hud +100 +100 for 200 instead of +200. This could all be cleaner if we can edit stock scripts, which we cant :( lol
All of this is untested so let me know if it works out for you. Scripting is an art of simplicity and brevity, keep your code short if you can
It's working! Haven't tested multiplayer I'll get back to you on that... Although, It is a bit crazy the amount of points you're getting from it. Is there anyway to lessen the amount of points for each thing, or overall. Such as I was able to do through set_zombie_var? Thanks!
ModmeBot:
Reply By: natesmithzombies
Blink-420It's working! Haven't tested multiplayer I'll get back to you on that... Although, It is a bit crazy the amount of points you're getting from it. Is there anyway to lessen the amount of points for each thing, or overall. Such as I was able to do through set_zombie_var? Thanks!
Unfortunately the only things passed to that function are the damage weapon and the points. The best you can do is the following:
functioninit_doublePoint_perk(){level.player_score_override=&checkCustomPerk;}functioncheckCustomPerk(damage_weapon,player_points){if(isDefined(self.hasCustomPerk)&&self.hasCustomPerk)zm_score::add_to_player_score(player_points/4);// I added a divisor of 4 to lessen the points returnplayer_points;}
ModmeBot:
Reply By: Blink-420
natesmithzombies
Blink-420It's working! Haven't tested multiplayer I'll get back to you on that... Although, It is a bit crazy the amount of points you're getting from it. Is there anyway to lessen the amount of points for each thing, or overall. Such as I was able to do through set_zombie_var? Thanks!
Unfortunately the only things passed to that function are the damage weapon and the points. The best you can do is the following:
functioninit_doublePoint_perk(){level.player_score_override=&checkCustomPerk;}functioncheckCustomPerk(damage_weapon,player_points){if(isDefined(self.hasCustomPerk)&&self.hasCustomPerk)zm_score::add_to_player_score(player_points/4);// I added a divisor of 4 to lessen the points returnplayer_points;}
Thank you very much :)
ModmeBot:
Reply By: natesmithzombies
Blink-420
natesmithzombies
Blink-420It's working! Haven't tested multiplayer I'll get back to you on that... Although, It is a bit crazy the amount of points you're getting from it. Is there anyway to lessen the amount of points for each thing, or overall. Such as I was able to do through set_zombie_var? Thanks!
Unfortunately the only things passed to that function are the damage weapon and the points. The best you can do is the following:
functioninit_doublePoint_perk(){level.player_score_override=&checkCustomPerk;}functioncheckCustomPerk(damage_weapon,player_points){if(isDefined(self.hasCustomPerk)&&self.hasCustomPerk)zm_score::add_to_player_score(player_points/4);// I added a divisor of 4 to lessen the points returnplayer_points;}