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

Need help understanding temporary "weapons" given to the player

broken avatar :(
Created 8 years ago
by BuIlDaLiBlE
0 Members and 1 Guest are viewing this topic.
3,883 views
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 30 July 2013
Last active: 2 months ago
Posts
152
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
BuIlDaLiBlE's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
I need a little help understanding how temporary weapons work. For example, when you pack-a-punch the "knuckles weapon" is given to the player and it plays its animation then this "weapon" is taken from the player. But I don't understand how does it work exactly. Like you don't see the ammo counter on it (not always though) and you can't switch this weapon to another one nor sprint with this "weapon" (I guess that's a weapon file setting). Also, are all guns before pack-a-punching being saved and taken from you and then they are given back? Someone who knows this stuff good pls explain it.
Another thing bothering me is why Syrette in WaW can't be switched to another weapon and why when you switch it disappears (you can't switch to it again)? In BO1\BO2 you can switch it during reviving and shoot at zombies which is pretty badass to do.
Last Edit: August 02, 2016, 04:29:32 pm by BuIlDaLiBlE
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 6 months ago
Posts
1,322
Respect
Forum Rank
Zombie Colossus
Primary Group
UGX Team Member
My Groups
More
My Contact & Social Links
More
Personal Quote
(ง º ω º )ง u wont sum m8y?
Signature
Do not take life too seriously. You will never get out of it alive.
×
DidUknowiPwn's Groups
UGX Team Member
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Scripter Elite Has shown excellence and experience in the area of custom scripting in the UGX-Mods community.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
Read this and see if you understand it:
Code Snippet
Plaintext
upgrade_knuckle_crack_begin()
{
self DisableOffhandWeapons();
self DisableWeaponCycling();

self AllowLean( false );
self AllowAds( false );
self AllowSprint( false );
self AllowProne( false );
self AllowMelee( false );

if ( self GetStance() == "prone" )
{
self SetStance( "crouch" );
}

primaries = self GetWeaponsListPrimaries();

gun = self GetCurrentWeapon();
weapon = "zombie_knuckle_crack";

if ( gun != "none" && gun != "mine_bouncing_betty" )
{
self TakeWeapon( gun );
}
else
{
return;
}

if( primaries.size <= 1 )
{
self GiveWeapon( "zombie_colt" );
}

self GiveWeapon( weapon );
self SwitchToWeapon( weapon );

return gun;
}
from _zombiemode_perks
Marked as best answer by BuIlDaLiBlE 8 years ago
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 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
Besides reading the script above, the reason for not being able to switch is DisableWeaponCycling(); being called on the player. You'll find that in all the scripts where a bottle is given or the syrette or knuckle crack. For reviving, it is specifically in revive_trigger_think function in the _lastand gsc. Here you will see it give the syrette, switch to it, disable cycling and off hand weapons, and set the ammo of the syrette to 1.

Code Snippet
Plaintext
			reviver GiveWeapon( "syrette" );//give
reviver SwitchToWeapon( "syrette" );//switch to
reviver DisableWeaponCycling();//disable cycling
reviver DisableOffhandWeapons();//disable off hand weapons
reviver SetWeaponAmmoStock( "syrette", 1 );//set ammo to 1


You could in theory comment out the disable lines, and have another function that simply waits for weapon_change_complete notify for each player and if the player has the syrette and the current weapon isn't the syrette, take the syrette. That may allow you to switch off the syrette while still reviving... you may not even need the other function since once they have suceeded in the revive it will be taken anyway... but thats up to you.
Last Edit: August 02, 2016, 05:39:40 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 30 July 2013
Last active: 2 months ago
Posts
152
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
BuIlDaLiBlE's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
DisableWeaponCycling()
Oooh now I get what it does. I wonder, where are those basic functions that can be called everywhere? In what file I can see this function?
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 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
Oooh now I get what it does. I wonder, where are those basic functions that can be called everywhere? In what file I can see this function?

I'm gonna go with its an engine function because it's not in any gsc, but I would defer to DUKIP for anymore info on it since he knows that the best. See here:
https://ugx-mods.com/forum/index.php/topic,7207.msg78105.html#msg78105

If you use sublime, I have a version, using his list, for it as well here:
https://ugx-mods.com/forum/index.php/topic,5923.0.html
(more managed here) https://github.com/MakeCentsGaming/Sublime-CodScript
Last Edit: August 02, 2016, 06:06:22 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 30 July 2013
Last active: 2 months ago
Posts
152
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
BuIlDaLiBlE's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
I'm gonna go with its an engine function because it's not in any gsc, but I would defer to DUKIP for anymore info on it since he knows that the best. See here:
https://ugx-mods.com/forum/index.php/topic,7207.msg78105.html#msg78105

If you use sublime, I have a version, using his list, for it as well here:
https://ugx-mods.com/forum/index.php/topic,5923.0.html
(more managed here) https://github.com/MakeCentsGaming/Sublime-CodScript
Omg thanks for that. Honestly I've been using a plain text editor (AkelPad) all this time, it's quite fine but obviously not for proper scripting. Been too lazy to set up a good environment. What do you prefer best to use? I see UltraEdit has this root of files so I don't have to go through directories in Explorer in order to open files (that's really inconvenient).
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 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
Omg thanks for that. Honestly I've been using a plain text editor (AkelPad) all this time, it's quite fine but obviously not for proper scripting. Been too lazy to set up a good environment. What do you prefer best to use? I see UltraEdit has this root of files so I don't have to go through directories in Explorer in order to open files (that's really inconvenient).

NP

yeah, I hear good things about UltraEdit. I prefer sublime text 2 (free) myself because I've been using it for a long while. I like the folder structure you can add to the side, multi-cursor, mass file search feature, it's customizable auto completions, and many other things about it. But I think they will be releasing a sublime auto-complete tool for sublime in bo3 tools, from what I saw on mappers united, so that could also persuade someone... in the beginning at least until someone makes them for other editors.
Last Edit: August 02, 2016, 07:22:55 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 30 July 2013
Last active: 2 months ago
Posts
152
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
BuIlDaLiBlE's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
NP

yeah, I hear good things about UltraEdit. I prefer sublime text 2 (free) myself because I've been using it for a long while. I like the folder structure you can add to the side, multi-cursor, mass file search feature, it's customizable auto completions, and many other things about it. But I think they will be releasing a sublime auto-complete tool for sublime in bo3 tools, from what I saw on mappers united, so that could also persuade someone... in the beginning at least until someone makes them for other editors.
Well, I think I'll go with Sublime Text then.
Excluded a lot of unneeded shit already:
Last Edit: August 02, 2016, 08:07:37 pm by BuIlDaLiBlE
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 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
Well, I think I'll go with Sublime Text then.
Excluded a lot of unneeded shit already:
(Image removed from quote.)

Cool, I've tried a lot of them over the years, free ones that is. I still use others for some languages, but sublime is the most versatile and eye pleasing for me to work in most languages. Of course I've also been known to create vba in Excel that, use formulas, based on drop-down boxes, to write vba in Word that runs and creates styles in a template, lol. So I like to move my data between many programs. The one thing I don't like how sublime handles is the layout. As far as I know you can not deem each box a file extension. Say gsc opens in top right, csc in top left, menu on the bottom, or whatever and so on. That would be helpful for me. I've not seen any editor like that yet though. (maybe you can do it, but I haven't found out how)

Here is the link about sublime in bo3 tools I was talking about:
http://mappersunited.com/index.php?/topic/585-smart-coding-now-included-d/
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 30 July 2013
Last active: 2 months ago
Posts
152
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
BuIlDaLiBlE's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
The one thing I don't like how sublime handles is the layout. As far as I know you can not deem each box a file extension. Say gsc opens in top right, csc in top left, menu on the bottom, or whatever and so on. That would be helpful for me. I've not seen any editor like that yet though. (maybe you can do it, but I haven't found out how)
Duh I just use one window. One thing that may be helpful is a comparison between two files with the same name (if they differ inside, like I need to to update Harry's Perks from version 4.0.3 to 5.0.0).

Here is the link about sublime in bo3 tools I was talking about:
http://mappersunited.com/index.php?/topic/585-smart-coding-now-included-d/
What is that Treyarch providing exactly? Like, auto-completion thingy so you don't have to write (or even find if you forgot) functions? If so, then it's quite helpful.
Didn't buy BO3 yet though, too fuckin' expensive. Even on sale it's too expensive. Here in Russia the price is really high so I didn't get the chance to have money to buy it... yet. Why they offer MP starter pack and not zombies starter pack? Fuck MP! :(
Anyway thx for help, marked your post as solved.
Last Edit: August 02, 2016, 08:34:05 pm by BuIlDaLiBlE
broken avatar :(
×
broken avatar :(
Location: gbMilton Keynes
Date Registered: 17 January 2014
Last active: 4 years ago
Posts
6,877
Respect
1,004Add +1
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 Links[email protected]HarryBo21HarryBo000
theres like 4 different script references for cod 5, including on this very site
broken avatar :(
×
broken avatar :(
Location: ruMoscow
Date Registered: 30 July 2013
Last active: 2 months ago
Posts
152
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Donator ♥
My Groups
More
My Contact & Social Links
More
×
BuIlDaLiBlE's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
theres like 4 different script references for cod 5, including on this very site
Yes I know about them existing. But they lack good explanation. I just wanted more help and I received it, thanks for this awesome community.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 4 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 is that Treyarch providing exactly? Like, auto-completion thingy so you don't have to write (or even find if you forgot) functions? If so, then it's quite helpful.


I think so. It will help with that and other little things like indenturing, commenting, and what not, it even searches your open files for auto-completion. Should be nice, and save some learning time too. Great thing about sublime is you can edit it to fit your style then, very easily. (like in mine, i have every function in every stock gsc, and csc, in mine, and what script they came from, makes it easy to find everything, just by typing it in) You can also get a pocket version of sublime, if you get into any admin issues while trying to install it, it don't require installation.  :D
Last Edit: August 02, 2016, 08:46:46 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 9 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
You can switch weapons with the syrette in BO1 because of their laststand weapon system, in WaW it takes all the weapons and gives you the m1911 or whatever, in BO1/2 it disables weapon cycling and either switches to a pistol you already have, or gives you the m1911. Since 3ARC didn't include their increment_drinking()/decrement_drinking() functions to work with sytrette like they did perk bottles/knuckle crack/bowie flourish ( those functions add/subtract to a counter to find out when weapon switching should be enabled/disables, and also can be used to point out when a player is 'drinking' or not ) because you can't revive someone while 'drinking', and if they do tell the game you are drinking as soon as you get the syrette, you wouldn't be able to revive anyone, and they were too damn lazy to script anything to make this work, they didn't disable weapon switching when you are given the syrette.

 
Loading ...