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

Gas Weapon Fuel/Ammo Count

broken avatar :(
Created 11 years ago
by MakeCents
0 Members and 1 Guest are viewing this topic.
2,464 views
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
Signature
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
I want to find out when a gas weapon is empty/overheated. Basically when I fire but the gun won't fire on an unlimited ammo weapon. I am not sure how it keeps track of the ammo in a gas weapon.

What I have noticed:
Spoiler: click to open...
When I switch it out it gradually gains while you are not holding it, and if I use my weapon trader script with it, (that puts it on the ground), it knows where it was when I dropped it, and it is still there when I pick it up again. GetWeaponAmmoClip and GetWeaponAmmoStock don't show any change while firing or empty, of course, so how does it work? I had two gas guns and each kept track of there fuel position separately. Is there an attribute of the weapon that holds this information? Something is keeping track of it and changing it while a player has it.

I tried to rewrite something that times the player while firing and while not firing,but failed. Couldn't get it to match the weapon file perfectly, so I will take a break on the math on that. How does the weapon hud keep track of it? Is this something to do with the menu file? ???
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years 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.
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
There's an ownerdraw for it(gas weapons). I can possibly look into the ownerdraw code but I won't be able to post the code.
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
There's an ownerdraw for it(gas weapons). I can possibly look into the ownerdraw code but I won't be able to post the code.

well if it takes all that, then I will live without it. It isn't a game breaker, just wanted to play an fx on the weapon when it overheated is all. Thanks for the response though.

Edit: Maybe there is a way to check if the attackbutton is pressed but the weapon isn't firing or something? That would at lest give me something.
Last Edit: February 16, 2015, 05:00:23 pm by MakeCents
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years 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?
×
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.
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
I don't see any notifies in the exe nor in script for something related to "overheat" :(
I'll check out the ownerdraw to see if it is possible to do something about it.

Edit: Okay no it's not possible to check by script, but you could probably replicate the overheating function by hand.
I'll look into that too to see if it can be replicated.
Last Edit: February 16, 2015, 05:29:49 pm by DidUknowiPwn
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
I don't see any notifies in the exe nor in script for something related to "overheat" :(
I'll check out the ownerdraw to see if it is possible to do something about it.

Edit: Okay no it's not possible to check by script, but you could probably replicate the overheating function by hand.
I'll look into that too to see if it can be replicated.

Thanks man. I did try to replicate it, just didn't take the time to get it perfect based off weapon file times cause it seemed like a bandade, rather than the right way. It was half working in a perfect world, lol. Was checking if firing and if had weapon and then trying to time it to match the overheat, but was failing on the math i think. Just off points of time, but it kept building. I'll post the code I was trying to use then when I get home. If it is perfect then I would use it. Don't waste too much time on it. Thanks again.
Last Edit: February 16, 2015, 05:53:46 pm by MakeCents
broken avatar :(
×
broken avatar :(
[UGX] Documentation Writer & Programmer
Location: usLos Angeles, CA
Date Registered: 23 August 2013
Last active: 3 years 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?
×
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.
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
Just so you know the rate lerps from currentheat to currentheat + heatrate
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
Just so you know the rate lerps from currentheat to currentheat + heatrate

well damn, if i can't access the currentheat then i prob won't be able to match the rate then, except for full and completely empty, which was working, it was just when I feathured it that it messed up. Well maybe close, but not easily
Last Edit: February 16, 2015, 08:28:17 pm by MakeCents
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 14 September 2013
Last active: 6 years ago
Posts
1,895
Respect
Forum Rank
Zombie Destroyer
Primary Group
Scripter
My Groups
More
My Contact & Social Links
More
Personal Quote
BE ORIGINAL
×
MakeCents's Groups
Mapper Has released one or more maps to the UGX-Mods 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
This is what I was working on before...
Code Snippet
Plaintext
overheatgun(){
timer = 0;
while(1){
                gun = self getcurrentweapon();
if(gun=="plasma_gun"){
while(self AttackButtonPressed()){
timer = timer + .01;
wait(.01);
if(timer>.6){
while(self AttackButtonPressed()){
//iprintlnbold("overheat");
wait(.01);
}

wait(4);
timer = .3;
}
}
if(timer>0){
if(!self AttackButtonPressed()){
timer = timer - .0007;
}
}
}
wait(.01);
}
}

 
Loading ...