Game Modding | Call of Duty: Black Ops 3 | Scripting
ModmeBot:
Thread By: Blink-420 I am trying to have my perk give the player 2x points when he has the perk. Any help would be appreciated. I've tried this
And I've tried this:
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
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
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
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:
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:
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: