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

easter egg q

broken avatar :(
Created 11 years ago
by MrStealYourGrill
0 Members and 1 Guest are viewing this topic.
2,716 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 July 2015
Last active: 10 years ago
Posts
18
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
I Gona Stl ur Gril M8
Signature
Mr.StealYourGrill Out!
                                 (with your grill)
×
MrStealYourGrill's Contact & Social Links
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


Code Snippet
Plaintext
init()
{
level.perk_cookies_shot = 0;
bottles = GetEntArray("perk_cookies", "targetname");
array_thread(bottles, ::dankMemes);
}

dankMemes()
{
self SetCanDamage(true);
self waittill("damage");
IPrintLnBold("You Found a Something!, Probably.");
level.perk_cookies_shot++;

if(level.perk_cookies_shot == 3)
doOtherDankness();
}

doOtherDankness()
{
players = get_players();
for(i = 0;i < players.size; i++)
self[i] setDankPerks();
}

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
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 3 months ago
Posts
480
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
Signature
Learn by doing, not copy and pasting.

Enjoy my 2015 contest map, a simple map with bo1-bo2 features
http://ugx-mods.com/forum/index.php?topic=14968.msg149200#
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentric_centriccInvictable
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...
Marked as best answer by MrStealYourGrill 11 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 5 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live."
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
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
Code Snippet
Plaintext

setDankPerks()
{
perk = [];
perk[0] = "specialty_armorvest";
perk[1] = "specialty_quickrevive";
perk[2] = "specialty_rof";
perk[3] = "specialty_fastreload";
perk[4] = "specialty_bulletaccuracy";
perk[5] = "specialty_longersprint";
perk[6] = "specialty_detectexplosive";
perk[7] = "specialty_extraammo";
perk[8] = "specialty_boost";
perk[9] = "specialty_reconnaissance";
perk[10] = "specialty_ordinance";
for(i = 0; i < perk.size; i++)
{
                 self thread maps\_zombiemode_perks::harrybo21_perks_give_perk( perk[i] );
}
        self setblur( 4, .1 );
wait .1;
self setblur( 0, .1 );
}
also in soOtherDankness change
Code Snippet
Plaintext
self[i]
  to
Code Snippet
Plaintext
players[i]
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 21 July 2015
Last active: 10 years ago
Posts
18
Respect
Forum Rank
Legless Crawler
Primary Group
Member
Personal Quote
I Gona Stl ur Gril M8
×
MrStealYourGrill's Contact & Social Links
and for the love of God, change those function names...
lol no prob m8
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 2 April 2014
Last active: 3 months ago
Posts
480
Respect
Forum Rank
Perk Hacker
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
Personal Quote
If it's not perfect, you'll never see it.
×
Centric's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Centric's Contact & Social Linkscentric_centriccInvictable
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
Code Snippet
Plaintext

setDankPerks()
{
perk = [];
perk[0] = "specialty_armorvest";
perk[1] = "specialty_quickrevive";
perk[2] = "specialty_rof";
perk[3] = "specialty_fastreload";
perk[4] = "specialty_bulletaccuracy";
perk[5] = "specialty_longersprint";
perk[6] = "specialty_detectexplosive";
perk[7] = "specialty_extraammo";
perk[8] = "specialty_boost";
perk[9] = "specialty_reconnaissance";
perk[10] = "specialty_ordinance";
for(i = 0; i < perk.size; i++)
{
                 self thread maps\_zombiemode_perks::harrybo21_perks_give_perk( perk[i] );
}
        self setblur( 4, .1 );
wait .1;
self setblur( 0, .1 );
}
also in soOtherDankness change
Code Snippet
Plaintext
self[i]
  to
Code Snippet
Plaintext
players[i]

That's what I told him to do without doing it for him :please:
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Signature
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 ;)
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
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
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 11 March 2014
Last active: 5 years ago
Posts
264
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
×
buttkicker845's Groups
buttkicker845's Contact & Social Links
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

ohh i didnt know that you had created a level variable for all of the perks :D

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 :please:

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 ;)
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 6 years ago
Posts
6,875
Respect
Forum Rank
Immortal
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
×
Harry Bo21's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Harry Bo21's Contact & Social LinksHarryBo000[email protected]HarryBo21
Quote
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

 
Loading ...