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

Perk Bottle Error

HOT
broken avatar :(
Created 9 years ago
by HyperFirez
0 Members and 1 Guest are viewing this topic.
16,697 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
So I was making a perk script that is a modified version of the default perk script, but I wanted to use 1 perk bottle because the default ofc uses 1 for each machine, the weapon file has multiple gun models but in game when I go to use a machine it doesn't even play an animation with an invisible perk bottle.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents'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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
it doesn't even play an animation with an invisible perk bottle.

?

You may need a vid of this or some script showing your modifications to help with this. What I have seen in that area before is it doesn't give you the bottle and takes away your ability to switch weapons or sprint. If this is happening, then it is stuck waiting for the weapon switch or something like that. I don't have the script in front of me to give specifics.

broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents'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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
http://pastebin.com/AVcDr2m9

Well I see you removed the:
Code Snippet
Plaintext
self waittill_any( "fake_death", "death", "player_downed", "weapon_change_complete" );
Which causes what I said, but the problem you are having right now is probably that you are not giving the weapon properly. When you give another model for a weapon you use a number not the model name or whatever you are using there. So it would be:
Code Snippet
Plaintext

 self GiveWeapon( "zombie_perk_bottle", 0 );
//                 weapon file name     model index

So in your case you are trying:
Code Snippet
Plaintext
 self GiveWeapon( "zombie_perk_bottle", "zombie_perk_bottle" );

So a modification to your switch that makes weapon a number instead of a string might work. You may need to add that wait back in though or it may just give the gun right back before finishing the bottle, but I'm not sure cause you have one under player.isdrinking, so you may be fine.
Last Edit: March 07, 2016, 03:09:50 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
Thanks I'll try it
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents'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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
Welp I made the changes, and still it doesn't even play an animation.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents'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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Welp I made the changes, and still it doesn't even play an animation.
You should probably put some iprints around your changes then. See what is running, what each var is, isdefined, and stuff like that. Also, for now I would initialize weapon as 0 instead of "".

Also, you don't take the bottle anymore, but that can be addressed after fixing this, I assume is what you will do.
Last Edit: March 07, 2016, 03:23:28 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
What are iprints?
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 5 years ago
Posts
6,877
Respect
Forum Rank
Immortal
Primary Group
Community 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.
Community 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
did you precache it before zombiemode::main(); ?

Code Snippet
Plaintext
PrecacheItem( "weapon_file_name" );
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents'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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
What are iprints?

Code Snippet
Plaintext
    //down where you changed things
    iprintln("This is happening");

    //before giving the weapon
    iprintln("weapon var is ", weapon);

    //up where gun = player per.....
    iprintln(gun);

If nothing prints either the code isn't running or there was an error or something is undefined.

You may also just want to put the script back the way it was. Test again. Then just add your switch before the giveweapon part and add your var.

did you precache it before zombiemode::main(); ?

Code Snippet
Plaintext
PrecacheItem( "weapon_file_name" );

he did.
Last Edit: March 07, 2016, 03:31:57 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
It's preached at the top of the script.
broken avatar :(
×
broken avatar :(
Location: esMadrid
Date Registered: 27 March 2015
Last active: 5 years ago
Posts
371
Respect
Forum Rank
Perk Hacker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
JIGGLYPUFF used SING! YOU fell asleep!
Signature
×
Soy-Yo's Groups
Soy-Yo's Contact & Social LinksSoy-yoElCerdoRey
Code Snippet
Plaintext
perk_give_bottle_begin( perk )
{
    gun = self GetCurrentWeapon();
    weapon = "";
   
 
    switch( perk )
    {
    case "specialty_armorvest":
        weapon = "zombie_perk_bottle";
        break;
 
    /*case "specialty_quickrevive":
        //weapon = "zombie_perk_bottle_jugg";
        break;
 
    case "specialty_fastreload":
        //weapon = "zombie_perk_bottle_jugg";
        break;
 
    case "specialty_rof":
        //weapon = "zombie_perk_bottle_jugg";
        break;
       
    case "specialty_detectexplosive":
        //weapon = "zombie_perk_bottle_jugg";
        break;
 
    case "specialty_longersprint":
        //weapon = "zombie_perk_bottle_jugg";
        break;
 
    case "specialty_extraammo":
        //weapon = "zombie_perk_bottle_jugg";
        break;
 
    case "specialty_bulletaccuracy":
        //weapon = "zombie_perk_bottle_jugg";
        break;
       
    case "specialty_reconnaissance":
        //weapon = "zombie_perk_bottle_jugg";
        break;
       
    case "specialty_shades":
        //weapon = "zombie_perk_bottle_jugg";
        break;
       
    case "specialty_boost":
        //weapon = "zombie_perk_bottle_jugg";
        break;
       
    case "specialty_ordinance":
        //weapon = "zombie_perk_bottle_jugg";
        break;*/
    }
   
    self GiveWeapon( "zombie_perk_bottle", weapon );
    self SwitchToWeapon( "zombie_perk_bottle" );
 
    return gun;
}
 
 
perk_give_bottle_end( gun, perk )
{
    weapon = "";
    switch( perk )
    {
    case "specialty_armorvest":
        weapon = "zombie_perk_bottle";
        break;
    }

 
    self TakeWeapon(weapon);
}
In the first function you have everything commented out, so weapon will be always "", except for jugg. You should uncomment the switch and change weapon to the index of the bottle model (0, 1, 2...), not the string.
And in the second function, you don't need the switch/case at all, because it will only do something for jugg again. Just:
Code Snippet
Plaintext
self TakeWeapon("zombie_perk_bottle");
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 6 July 2015
Last active: 5 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
ok

Double Post Merge: March 07, 2016, 04:59:12 pm
Welp it somewhat works now lamo https://gyazo.com/a3fa68810e380ac4ad7baca88adf8f36
Last Edit: March 07, 2016, 04:59:12 pm by HyperFirez
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 5 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents'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.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Welp it somewhat works now lamo https://gyazo.com/a3fa68810e380ac4ad7baca88adf8f36

Did you add those models your using for the perk bottles to your csv?
Last Edit: March 07, 2016, 05:19:57 pm by MakeCents

 
Loading ...