player.score -= cost; player thread maps\_zombiemode_powerups::zombie_perk_powerup(); } } }
then in _zombiemode.gsc
Code Snippet
Plaintext
maps\_gerard_wunderfizz
then in _zombiemode_powerups I added DUKIP's Random Perk Powerup function to work with the wunderfizz, I added it at the bottom of _zombiemode_powerups.gsc:
Code Snippet
Plaintext
zombie_perk_powerup() { self endon("disconnect");
player = self; perk = getRandomPerk(player); //DUKIP - Make sure player doesn't have the perk and perk is defined. if(player HasPerk(perk) || !IsDefined(perk)) { //DUKIP - 50/50 chance of playing the sound. if(cointoss()) player PlayLocalSound("sam_nospawn"); return; }
//DUKIP - Moved this var to above the perk bottle give as there was a chance of getting "dual" perks. player.is_drinking = 1;
// do the drink animation gun = player maps\_zombiemode_perks::perk_give_bottle_begin( perk );
player waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
// restore player controls and movement player maps\_zombiemode_perks::perk_give_bottle_end( gun, perk ); player.is_drinking = undefined; // TODO: race condition? if ( player maps\_laststand::player_is_in_laststand() ) return;
player SetPerk( perk ); player thread maps\_zombiemode_perks::perk_vo(perk); player setblur( 4, 0.1 ); wait(0.1); player setblur(0, 0.1);
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
yea, currently your calling the script, but not directing what to do with it after that
your main function is called init(), so you need to call it
I added that and didn't work, like zombiemode wouldn't start until I hit the trigger and then I would start with 0 points... I know I'm doing something wrong and I've been working on scripts this whole day and just don't understand...
Last Edit: March 15, 2015, 03:59:33 am by GerardS0406
I never learned GSC scripting, it just happens to be near identical to Javascript or C++ which I am already familiar with. Id suggest just reading up on basic usage and syntax
There are some short tutorials around on this site, otherwise take a look at Treyarchs GSCs, if you read through them, before long youll start to work out what is doing what
First thing you should look at of Treyarchs is _zombiemode_perks.gsc. Its pretty basic and has most of what you want in there already.
AND stop editing your posts to remove stuff you just wrote!
That code was DidUKnowIPwns, I called you out, you deleted it!
We will help you if you stop this behaviour, keep it up and we will not. simple...
Huh... You Confuse me... The only script that Was DUKIP's was the zombie_perk_powerup and I gave credit... I deleted it because it didn't work after testing
Last Edit: March 15, 2015, 04:07:59 am by GerardS0406
player = self; perk = getRandomPerk(player); //DUKIP - Make sure player doesn't have the perk and perk is defined. if(player HasPerk(perk) || !IsDefined(perk)) { //DUKIP - 50/50 chance of playing the sound. if(cointoss()) player PlayLocalSound("sam_nospawn"); return; }
//DUKIP - Moved this var to above the perk bottle give as there was a chance of getting "dual" perks. player.is_drinking = 1;
// do the drink animation gun = player maps\_zombiemode_perks::perk_give_bottle_begin( perk );
player waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
// restore player controls and movement player maps\_zombiemode_perks::perk_give_bottle_end( gun, perk ); player.is_drinking = undefined; // TODO: race condition? if ( player maps\_laststand::player_is_in_laststand() ) return;
player SetPerk( perk ); player thread maps\_zombiemode_perks::perk_vo(perk); player setblur( 4, 0.1 ); wait(0.1); player setblur(0, 0.1);
player = self; perk = getRandomPerk(player); //DUKIP - Make sure player doesn't have the perk and perk is defined. if(player HasPerk(perk) || !IsDefined(perk)) { //DUKIP - 50/50 chance of playing the sound. if(cointoss()) player PlayLocalSound("sam_nospawn"); return; }
//DUKIP - Moved this var to above the perk bottle give as there was a chance of getting "dual" perks. player.is_drinking = 1;
// do the drink animation gun = player maps\_zombiemode_perks::perk_give_bottle_begin( perk );
player waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
// restore player controls and movement player maps\_zombiemode_perks::perk_give_bottle_end( gun, perk ); player.is_drinking = undefined; // TODO: race condition? if ( player maps\_laststand::player_is_in_laststand() ) return;
player SetPerk( perk ); player thread maps\_zombiemode_perks::perk_vo(perk); player setblur( 4, 0.1 ); wait(0.1); player setblur(0, 0.1);
Is also ALL DidUKnowIPwns so please tell me what YOU have done?
I already know, hence why you posted your "tutorial" quoting this as "your first script", which you have now deleted
Yes I gave credit for zombie_perk_powerup() script and the other one on http://ugx-mods.com/forum/index.php?topic=5962.msg65446#msg65446 I wasn't referring to that script because that one doesn't work (probably because I don't understand it) and I was referring to the one I posted and deleted because it didn't work
Last Edit: March 15, 2015, 04:20:03 am by GerardS0406