so i was doin a map with a simple ee where you collect 3 teddy bears and you get all perks. a simple script but imma usin harrybos perks so i dont know what to add where the script changes and so on. my script im usin is
setDankPerks() { perk = []; perk[0] = "specialty_armorvest"; perk[1] = "specialty_dank"; for(i = 0; i < perk.size; i++) { player SetPerk(perk[i]); player maps\_zombiemode_perks::perk_hud_create( perk ); player.stats["perks"]++; player thread maps\_zombiemode_perks::perk_think( perk ); } }
script model targetname is perk_cookies Callin it in zombiemode.gsc maps\_zombiemode_perk_cookies::init(); And maby this would work just the way it is? IDK any help would be awesome
credit for this script goes to diduknowipwn, took offa his script and edited it
Moderator edit - HarryBo21 - removed the "Y" everyone seems to put in my name lol its Harry-Bo, a respelling of the common English sweets "Harribo"
Last Edit: August 12, 2015, 02:19:37 am by Harry Bo21
Call it in mapname.gsc, look in Harry's zombiemode perks to find the name of the perks and add them to the array. and for the love of God, change those function names...
Call it in mapname.gsc, look in Harry's zombiemode perks to find the name of the perks and add them to the array. and for the love of God, change those function names...
he needs to do more than that since right now he is going to end up with a bunch of syntax errors
so first off you need to change the method that sets the perks, to use the method that harry already made to set the perk for the player. it does all the updating of the stats,hud, and sets the perk so theres no point in writing it all yourself plus youre going to get an error in the same method saying player and perk are both undefined change setDankPerks() to this
he needs to do more than that since right now he is going to end up with a bunch of syntax errors
so first off you need to change the method that sets the perks, to use the method that harry already made to set the perk for the player. it does all the updating of the stats,hud, and sets the perk so theres no point in writing it all yourself plus youre going to get an error in the same method saying player and perk are both undefined change setDankPerks() to this
If you want scripts / features made for you, then contact me by PM or email / skype etc it will cost you tho so if you have no intention of reciprocating don't even waste my time
lol was just about to dive in and correct you, as justusing "setperk" will not thread the other stuff for the perks or show the shader
but buttkicker845 bascially nailed it, dont need all that though
just
Code Snippet
Plaintext
for ( i = 0; i < level.zombie_perks.size; i++ ) { self thread maps\_zombiemode_perks::harrybo21_perks_give_perk( level.zombie_perks[ i ].perk_name ); }
as the perks are already defined in level.zombie_perks and level.zombie_perks[ perk ].perk_name === "specialty_WHATEVER"
if i recall right
also the blur is only used when drinking bottles, this is true of the Treyarch stuff too, being given a perk by other means does not blur the screen
Last Edit: August 11, 2015, 11:58:48 pm by Harry Bo21
for ( i = 0; i < level.zombie_perks.size; i++ ) { self thread maps\_zombiemode_perks::harrybo21_perks_give_perk( level.zombie_perks[ i ].perk_name ); }
as the perks are already defined in level.zombie_perks and level.zombie_perks[ perk ].perk_name === "specialty_WHATEVER"
if i recall right
ohh i didnt know that you had created a level variable for all of the perks
Quote
also the blur is only used when drinking bottles, this is true of the Treyarch stuff too, being given a perk by other means does not blur the screen
i didnt know that honestly, i just figured having a blur might be nice so you know that something happened
That's what I told him to do without doing it for him
youre right i did just do it for him but one thing ive learned from the past is that sometimes the best thing in the world is to have an example of how to do rather than having a short explanation of it. especially when it came to first learning syntax, which in this case was going to cause a bunch of errors
ohh i didnt know that you had created a level variable for all of the perks
yeah i did it the same way as the treyarch scripts, because of potential conflicts ( like i left the stock player quote function at the bottom or other scripts would complain about "missing function", so tried to stay inline to prevent things like that )
Either way is fine, and as for the blur i guess thats just preference
Quote
youre right i did just do it for him but one thing ive learned from the past is that sometimes the best thing in the world is to have an example of how to do rather than having a short explanation of it. especially when it came to first learning syntax, which in this case was going to cause a bunch of errors
It also "wasnt" explained.
Quote
Call it in mapname.gsc, look in Harry's zombiemode perks to find the name of the perks and add them to the array. and for the love of God, change those function names...
Although butt kicker "did" do this, there is no need to add them to an array, nor did he mention how to actually give the perk, just that the function exists. Just "adding them to the array" will do nothing, as the perk isnt set, my function wouldnt be called, so no shader of effect of having it
would have a nice organized array however lol
Last Edit: August 12, 2015, 02:18:11 am by Harry Bo21