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

Gobble Gum Machine Prefab + Script! lad420 Edition

broken avatar :(
Created 8 years ago
by codwadlad420
0 Members and 1 Guest are viewing this topic.
14,574 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 27 March 2015
Last active: 8 months ago
Posts
6
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
I love developing cod maps
×
codwadlad420's Groups
codwadlad420's Contact & Social Linksxuan_devlad420
I have a shitty version of the gobble gum machine that I made but a good script ready for use! This is an initial release so don't expect the machine to pick a random gobble gum and have the images for every gobble gum. There are only 5 working gobble gums, and others have not been made yet! I don't have time to script all the gobble gums so I'm releasing my work to this amazing community! I hope you see this as a reward in a way! You're getting to script the rest of the gobble gums and even make your own!!!! Think about all the possibilites!!! Zero gravity gobble gum for 30 seconds, 5 gun slots instead of 3 like mule kick, health boost and more that you can make on your own!! I hope you will use this in a awesome matter and help me build off of this! I still need the bo3 gobble gum prefab but I didn't find anyone that could share it with me :/ . Anyways enjoy and happy scripting!

 :rainbow:

Prefab Download link:
https://mega.nz/#!sYRX2JiL!71pEFDputnUMUCp65sDNIGazmJVV-2RePVCzq95fEwA

Script link:
http://pastebin.com/RDbaqQDs
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
Signature
Let's keep this thread on topic from here on in. -DBZ

+1 to off-topic reply -DBZ

lmao. Too funny.

Goliath Script Placer: http://ugx-mods.com/forum/index.php/topic,11234.msg125257/topicseen.html#new

"...Christ, people. Learn C, instead of just stringing random characters
together until it compiles (with warnings)..."

-Linus Torvalds
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
Code Snippet
Plaintext
gobble_gum_machine()
{
    //image of gobble gum
    PrecacheShader( "specialty_gobble_gum_zombies");
    PrecacheShader( "specialty_nuke");
    //cost of gobble gum buy
    cost = 500;
   
    //activate the following script code when player buys perk
    trigger = getEnt("gobble_gum_trigger", "targetname");
 
   
    bought_round_number = undefined;
    //level.round_number = 0;
    last_round = 0;
   
    trigger setHintString ("Hold &&1 to dispense Gobble Gum [500]");
                   
        //hold code till trigger is activated
        trigger waittill("trigger", player);
           
        using_player = player;
           
        //random gumball script here
            //--------------------------------------
        gobble_gums_index = 0;
           
        gobble_gums = [];
               
        add_to_array("gobble_gums","insta_kill");
        add_to_array("gobble_gums","double_points");
        add_to_array("gobble_gums","nuke");
        add_to_array("gobble_gums","plain_sight");
        add_to_array("gobble_gums","pack_a_punch");
               
        //gobble_gum = gobble_gums[RandomInt(gobble_gums.size)];
               
        //gobble_gum = array_randomize(gobble_gums);
               
        //if( gobble_gums_index >= gobble_gums.size )
        //{
        //  gobble_gums_index = 0;
        //  randomize_gobble_gums(gobble_gums);
        //}
               
        //gobble_gums_index++;
               
        //--------------------------------------
        //final gumball selected from script
        //this pack a punch gobble gum packs my current gun for 30 seconds and then returns the old one after the time has ran out!
        gumball = "pack_a_punch";
        //this gumball code will give me the gumball without picking a random one
        //--------------------------------------
           
           
        if ( player.score < cost )
        {
            //player iprintln( "Not enough points to buy Perk: " + perk );
            self playsound("deny");
            player thread play_no_money_perk_dialog();
            //continue;
        }
        else
        {
            //blur players view for effect
            player setblur( 4, 0.1 );
            wait(0.6);
            player setblur(0, 0.1);
               
            //add the image of the shader to the hud
            player thread gumball_hud_create(gumball);
                   
            //subtract players points for the cost of the gobble gum machine
            player maps\_zombiemode_score::minus_to_player_score(cost);
               
            player thread gobble_gum_activate(using_player, gumball);
           
            //bought_round_number = level.round_number;
        }
       
        //rerun the gobble gum machine script so it keeps running
        thread gobble_gum_machine();
   
}

Everytime this function is called again it attempts to precache the two shaders(which shouldn't be there anyway since its after _load.gsc) over again.  That is not "good". You should be using a while loop to loop the function, not calling the function again.

Everything else is mostly just duplicated code from _zombiemode_perks with waits and prints thrown in besides the gumbal == <whatever> which should else if structure not just a bunch of individual if statements.

Also, this:

Code Snippet
Plaintext
        doggie = getent("start_zone_spawners_dog", "targetname");
        using_player setOrigin(doggie.origin);

1. Not everyone uses dogs or use "start_zone" at the first zone name, so adding an isDefined() check is needed:

Code Snippet
Plaintext
        doggie = getent("start_zone_spawners_dog", "targetname");
if(isDefined(doggie))
        using_player setOrigin(doggie.origin);

(adding a else/else if to catch other possible scenarios would be even better!)

2. using setOrigin will literally teleport the player through the map to that origin.
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
respect the dead

donates greatly appreciated :) paypal.me/F3ARxReaper666
discord server:
https://discord.gg/tsGHW99
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
im pretty sure i could make a better version of this, no offence  ::)
broken avatar :(
×
broken avatar :(
☭ Soviet Commander ☭
Location: us
Date Registered: 13 August 2012
Last active: 8 years ago
Posts
2,790
Respect
Forum Rank
King of the Zombies
Primary Group
Community Daedra
My Groups
More
My Contact & Social Links
More
×
daedra descent's Groups
Community Daedra
Community Daedra
daedra descent's Contact & Social LinksBlueSoviet
im pretty sure i could make a better version of this, no offence  ::)

Don't even. Not only have you made the same mistakes with scripts you've released, you can't even indent your code. Atleast his is readable.
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Don't even. Not only have you made the same mistakes with scripts you've released, you can't even indent your code. Atleast his is readable.
i never said i was going to, just that i could, and my scripting has become better
broken avatar :(
×
broken avatar :(
Pragmatist
Location: in
Date Registered: 9 May 2015
Last active: 7 months ago
Posts
451
Respect
Forum Rank
Perk Hacker
Primary Group
UGX Site Moderator
My Groups
More
My Contact & Social Links
More
Personal Quote
Fish. That is all
Signature
×
Sidzzz's Groups
UGX Site Moderator Has the ability to issue warnings to users, edit and remove posts from the forum and to move topics to other boards. Upholds the rules of the forum. Moderates Chat Rooms.
Sidzzz's Contact & Social LinkssidzzzzzzS1dzzzS1dzzzSidzzzSidTheGamer126
im pretty sure i could make a better version of this, no offence  ::)

There is literally no point to this statement whatsoever. All you're doing is provoking the OP, laying out the foundation for potential arguments and making yourself out to be a braggadocious person. :poker:
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
i realize now i was being kind of a d*ck, sorry codwadlad420, this is actually pretty cool
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 4 years ago
Posts
114
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Signature
Maps:
Standoff Zombies [WIP]
Der Blitzdrache [WIP] (Maybe Canceled)
FNAF 1-4 [WIP] (Maybe Canceled)
×
HyperFirez's Groups
HyperFirez's Contact & Social LinksHyperFirezHyperFirezHyperFirezHyperFirezHyperFirezHyperFirezHyperFirez
I get a bad syntax error when I try to play. I put the script in my mapname.gsc file right?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 8 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Signature
My preferred name is "xSanchez78".
Check me out here: www.steamcommunity.com/id/xSanchez78
×
alaurenc9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
alaurenc9's Contact & Social LinksxSanchez78xSanchez78xSanchez78xSanchez78xSanchez78xSanchez78
Dude this script.... I mean it doesn't even save over games or have anything but I re-done perk script. I mean, the amount of anything that is even in here can be easily replicated by those who even know how to add their own gobble gum's. I personally think that this should have been kept to yourself until it had more to release, like images that come with it and not using the perk bottles and other re-used or even missing assets in this script as I guess what you probably called "place holders" in your "finished" release. None of the images you even did reference correctly are even included in the tutorial. I would think releases are more of something that people can use fully without any work at all other than the install, but when you just put out a blank script that is just a hardly modified version of a treyarch script and tell people to "make their own":
You're getting to script the rest of the gobble gums and even make your own!!!!
I don't think many people who even have the skill to make their own will want to use this sorry script. I think they would most likely make their own base script for it to, which apparently is really easy as you have demonstrated here, it isn't any more than just copying and pasting the perk scripts. These gobble gum's don't even save over games, let alone being selectable in an outside menu like they are in Black Ops 3. Sorry if this at all sounded harsh  :-\
Last Edit: February 07, 2016, 05:13:53 am by alaurenc9
broken avatar :(
×
broken avatar :(
Location: aupotato
Date Registered: 27 September 2013
Last active: 3 years ago
Posts
588
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
death_reaper0's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Community Scripter Has shown effort and knowledge in the area of scripting while being a part of the UGX-Mods community.
Dude this script.... I mean it doesn't even save over games or have anything but I re-done perk script. I mean, the amount of anything that is even in here can be easily replicated by those who even know how to add their own gobble gum's. I personally think that this should have been kept to yourself until it had more to release, like images that come with it and not using the perk bottles and other re-used or even missing assets in this script as I guess what you probably called "place holders" in your "finished" release. None of the images you even did reference correctly are even included in the tutorial. I would think releases are more of something that people can use fully without any work at all other than the install, but when you just put out a blank script that is just a hardly modified version of a treyarch script and tell people to "make their own":I don't think many people who even have the skill to make their own will want to use this sorry script. I think they would most likely make their own base script for it to, which apparently is really easy as you have demonstrated here, it isn't any more than just copying and pasting the perk scripts. These gobble gum's don't even save over games, let alone being selectable in an outside menu like they are in Black Ops 3. Sorry if this at all sounded harsh  :-\
I might be wrong but im not sure if you can have a menu outside the map that'll work alongside stuff like this. Ive only been scripting for about a year now so I dony know all funtions and could easily be wrong. The way I had liquid divinium in my cracked map is probably to closest to gobblegum so far and im not the best scripter when it comes to cod so someone could make a better one
Last Edit: February 07, 2016, 06:10:56 am by death_reaper0
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 4 years ago
Posts
114
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
HyperFirez's Groups
HyperFirez's Contact & Social LinksHyperFirezHyperFirezHyperFirezHyperFirezHyperFirezHyperFirezHyperFirez
Yeah Fear. I was working on a scrpit for gobblegums as well and I think a menu will work better with this.
broken avatar :(
×
broken avatar :(
Location: esspain
Date Registered: 5 September 2014
Last active: 7 years ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
deperVSzombis's Groups
deperVSzombis's Contact & Social LinksdeperdeperVSzombis
this is great, but I have a problem with who is who, when they kill me, the dead player stays and nothing happens, any idea how to fix it?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 4 years ago
Posts
114
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
×
HyperFirez's Groups
HyperFirez's Contact & Social LinksHyperFirezHyperFirezHyperFirezHyperFirezHyperFirezHyperFirezHyperFirez
This has nothing to do with gobblegums
broken avatar :(
×
broken avatar :(
Location: usHouse
Date Registered: 15 November 2014
Last active: 3 years ago
Posts
56
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Press F to Pay Respects ^
Signature
Thank you. :)
×
RayGuNNXXX123's Groups
RayGuNNXXX123's Contact & Social Links..Look Who's Back...DanisBoss123.
I get a bad syntax error when I try to play. I put the script in my mapname.gsc file right?
yea

Double Post Merge: August 07, 2017, 11:59:16 am
I don't know if you still reply to these comments but when I followed every step I go ingame and it just shows a hand and I can't buy the gobblegums.
Last Edit: August 07, 2017, 11:59:16 am by RayGuNNXXX123
broken avatar :(
×
broken avatar :(
Location: es
Date Registered: 25 May 2016
Last active: 4 years ago
Posts
98
Respect
Forum Rank
Rotting Walker
Primary Group
Member
×
kitos's Groups
kitos's Contact & Social Links
no problem with Scripting but i dont know why can´t take goble gun when i go to take an image of a hand appears

 
Loading ...