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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - NoScopeNinja25

Create a duplicate of the slide animation but move the joint to the same position to the position when it's empty.

I did that with all the other animations but they had a spot in APE to put the empty animations.  The slide animations only has these options:
Slide In
Slide In Air
Slide Loop
Slide Out

The sprint animations has these options:
Sprint In
Sprint Loop
Sprint Out
Sprint In Empty
Sprint Loop Empty
Sprint Out Empty

I could make the slide empty animations, but how would I apply them to the gun and still have the normal slide animations?
6 years ago
I pretty much have every thing completed for the M1911 but I am having trouble figuring out how to fix the sliding animation.  Most of the animations have a empty version, but the slide animation doesn't.  Since there is no slide empty animation, when I slide with the empty M1911 the slide on the top of the gun moves forward and the moves back after the animation ends.  I have linked a video of what is happening.



Is there a way to fix this?  Any help would be appreciated, this is the last thing I have to fix.  It does the same thing for the dual wield animations.
6 years ago
Code Snippet
Plaintext
SetSavedDvar( <dvar>, <value> );
I couldn't find "SetSavedDvar" in the BO3 API.

and otherwise you have to use stats to be able to save it between games.
How do you use stats?
7 years ago
I got it to work finally.  I changed the order variable to use the player's name because that works better if you play a game with someone else.  The name_split parts are to get it to work with a guest account because the space in the name messes with the dvar.  I have one more question, do dvars usually save their values after the game is closed completely?

Code Snippet
Plaintext
function bank()
{
    players = GetPlayers();
    for (i = 0;i<players.size;i++)
    {
        players[i].name_split = strTok(players[i].playername, " ");
        if (players[i].name_split.size == 2)
        {
            GetDvarInt("bank_player_" + players[i].name_split[0] + players[i].name_split[1], 0);
        }
        else
        {
            GetDvarInt("bank_player_" + players[i].playername, 0);
        }
    }
   
    level thread deposit();
    level thread withdraw();
}

function deposit()
{
    trig_depo = GetEnt("deposit_trig","targetname");
    trig_depo SetHintString("Hold ^3[{+activate}]^7 to Deposit into Bank[Amount:1000]");
    trig_depo SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_depo waittill("trigger", player);
         
            if (player zm_score::can_player_purchase(1000))
            {
                player zm_score::minus_to_player_score(1000);
                player.name_split = strTok(player.playername, " ");
                if (player.name_split.size == 2)
                {
                    SetDvar("bank_player_" + player.name_split[0] + player.name_split[1], GetDvarInt("bank_player_" + player.name_split[0] + player.name_split[1])+1000);
                    IPrintLn("Deposited $1000(New Total = " + GetDvarInt("bank_player_" + player.name_split[0] + player.name_split[1]) + ")");
                }
                else
                {
                    SetDvar("bank_player_" + player.playername, GetDvarInt("bank_player_" + player.playername)+1000);
                    IPrintLn("Deposited $1000(New Total = " + GetDvarInt("bank_player_" + player.playername) + ")");
                }
                player PlayLocalSound("purchase_accept");
            }
            else
            {
                player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");
            }
            break;
        }
        wait(0.25);
    }
}

function withdraw()
{
    trig_with = GetEnt("withdraw_trig", "targetname");
    trig_with SetHintString("Hold ^3[{+activate}]^7 to Withdraw From Bank\n[Amount: 1000][Fee: 100]");
    trig_with SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_with waittill("trigger", player);
           
            player.name_split = strTok(player.playername, " ");
            if (player.name_split.size == 2)
            {
                if (GetDvarInt("bank_player_" + player.name_split[0] + player.name_split[1]) >= 1000 && player zm_score::can_player_purchase(100))
                {
                    player zm_score::add_to_player_score(1000);
                    SetDvar("bank_player_" + player.name_split[0] + player.name_split[1], GetDvarInt("bank_player_" + player.name_split[0] + player.name_split[1])-1000);
                    IPrintLn("Withdrew $1000(New Total = " + GetDvarInt("bank_player_" + player.name_split[0] + player.name_split[1]) + ")");
                    wait(0.01);
                    player zm_score::minus_to_player_score(100);
                    player PlayLocalSound("purchase_accept");
                }
                else if (player zm_score::can_player_purchase(100) == false)
                {
                    player PlayLocalSound("purchase_deny");
                    IPrintLn("Not Enough Money");
                }
                else
                {
                    player PlayLocalSound("purchase_deny");
                    IPrintLn("Insufficient Funds(Total = " + GetDvarInt("bank_player_" + player.name_split[0] + player.name_split[1]) + ")");
                }
            }
            else
            {
                if (GetDvarInt("bank_player_" + player.playername) >= 1000 && player zm_score::can_player_purchase(100))
                {
                    player zm_score::add_to_player_score(1000);
                    SetDvar("bank_player_" + player.playername, GetDvarInt("bank_player_" + player.playername)-1000);
                    IPrintLn("Withdrew $1000(New Total = " + GetDvarInt("bank_player_" + player.playername) + ")");
                    wait(0.01);
                    player zm_score::minus_to_player_score(100);
                    player PlayLocalSound("purchase_accept");
                }
                else if (player zm_score::can_player_purchase(100) == false)
                {
                    player PlayLocalSound("purchase_deny");
                    IPrintLn("Not Enough Money");
                }
                else
                {
                    player PlayLocalSound("purchase_deny");
                    IPrintLn("Insufficient Funds(Total = " + GetDvarInt("bank_player_" + player.playername) + ")");
                }
            }
            break;
        }
        wait(0.25);
    }
}
7 years ago
Now when I set the dvar it sets it to 1000 and then it immediately goes to zero:

Code Snippet
Plaintext
function bank()
{
    players = GetPlayers();
    for (i = 0;i<players.size;i++)
    {
        GetDvarInt("bank_player_" + i, 0);
        players[i].order = i;
    }
   
    level thread deposit();
    level thread withdraw();
}

function deposit()
{
    trig_depo = GetEnt("deposit_trig","targetname");
    trig_depo SetHintString("Hold ^3[{+activate}]^7 to Deposit into Bank[Amount:1000]");
    trig_depo SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_depo waittill("trigger", player);
         
            if (player zm_score::can_player_purchase(1000))
            {
                player zm_score::minus_to_player_score(1000);
                SetDvar("bank_player_" + self.order, GetDvarInt("bank_player_" + self.order)+1000);
                IPrintLn("Deposited $1000(New Total = " + GetDvarInt("bank_player_" + self.order) + ")");
                player PlayLocalSound("purchase_accept");
            }
            else
            {
                player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");
            }
            break;
        }
        wait(0.25);
    }
}

function withdraw()
{
    trig_with = GetEnt("withdraw_trig", "targetname");
    trig_with SetHintString("Hold ^3[{+activate}]^7 to Withdraw From Bank\n[Amount: 1000][Fee: 100]");
    trig_with SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_with waittill("trigger", player);
           
            if (GetDvarInt("bank_player_" + self.order) >= 1000 && player zm_score::can_player_purchase(100))
            {
                player zm_score::add_to_player_score(1000);
                SetDvar("bank_player_" + self.order, GetDvarInt("bank_player_" + self.order)-1000);
                IPrintLn("Withdrew $1000(New Total = " + GetDvarInt("bank_player_" + self.order) + ")");
                wait(0.01);
                player zm_score::minus_to_player_score(100);
                player PlayLocalSound("purchase_accept");
            }
            else if (player zm_score::can_player_purchase(100))
            {
                player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");
            }
            else
            {
                player PlayLocalSound("purchase_deny");
                IPrintLn("Insufficient Funds(Total = " + GetDvarInt("bank_player_" + self.order) + ")");
            }
            break;
        }
        wait(0.25);
    }
}
7 years ago
prob coz your "getting" a dvar that doesnt exist "before setting" it then trying to use it
Dvars are different in Black Ops 3.  The number after the dvar name, in this case 0, is the default value to set the dvar if it doesn't find it.

also i believe GetDvar is global, so shouldnt be used "on" a player
I think this is the problem I was having because this code works:

Code Snippet
Plaintext
function bank()
{
    level.balance = GetDvarInt("bank_points", 0);
   
    level thread deposit();
    level thread withdraw();
}
Now I just have to figure out how to get it to work with individual players.

Also, are dvars supposed to save when you completely close the game?  Does this only happen in the mod tools or in the regular game too?  Right now it only saves when you leave the map and start the map again without closing the game.
7 years ago
Description:
The Community Bank allows you to share your points with your friends in a large money pool.  When you add money to the bank everyone can access it.  Points do not carry on to the next game.  You can use whatever object you would like for the bank.

Installation Instructions:
Part 1: Code
A. Paste the following code at the bottom of your <mapname>.gsc file which can be found in "Call of Duty Black Ops III\usermaps\<mapname>\scripts\zm":

Code Snippet
Plaintext
function bank_comm()
{
    level.balance = 0;
    level thread deposit();
    level thread withdraw();
}

function deposit()
{
    trig_depo = GetEnt("deposit_trig","targetname");
    trig_depo SetHintString("Hold ^3[{+activate}]^7 to Deposit into Community Bank[Amount:1000]");
    trig_depo SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_depo waittill("trigger", player);
            if (player zm_score::can_player_purchase(1000))
            {
                level.balance += 1000;
                player zm_score::minus_to_player_score(1000);
                //player PlayLocalSound("purchase_accept");
                IPrintLn("Deposited $1000(New Total = " + level.balance + ")");
            }
            else
            {
                //player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");
            }
            break;
        }
        wait(0.25);
    }
}

function withdraw()
{
    trig_with = GetEnt("withdraw_trig", "targetname");
    trig_with SetHintString("Hold ^3[{+activate}]^7 to Withdraw From Community Bank\n[Amount: 1000][Fee: 100]");
    trig_with SetCursorHint("HINT_NOICON");
    while(1)
    {
        while(1)
        {
            trig_with waittill("trigger", player);
            if (level.balance >= 1000 && player zm_score::can_player_purchase(100))
            {
                player zm_score::add_to_player_score(1000);
                level.balance -= 1000;
                wait(0.01);
                player zm_score::minus_to_player_score(100);
                //player PlayLocalSound("purchase_accept");
                IPrintLn("Withdrew $1000(New Total = " + level.balance + ")");
            }
            else if (level.balance < 1000)
            {
                //player PlayLocalSound("purchase_deny");
                IPrintLn("Insufficient Funds(Total = " + level.balance + ")");
            }
            else
            {
                //player PlayLocalSound("purchase_deny");
                IPrintLn("Not Enough Money");   
            }
            break;
        }
        wait(0.25);
    }
}
B. Paste the following code at the top of your main() function in your <mapname>.gsc:

Code Snippet
Plaintext
level thread bank_comm();
C. Paste the following code at the top of your <mapname>.gsc:

Code Snippet
Plaintext
#using scripts\zm\_zm_score;
Part 2: Radiant
A. Open your map in radiant
B. Open the Entity Browser by pressing B
C. Search for trigger_use
D. Drag it into your map and place it where you want to deposit money
E. Open the Entity Info by pressing N and select the trigger
F.  Change the "cursorhint" value to "HINT_NOICON"
G. Change the "targetname" value to "deposit_trig"
H. Deselect the trigger and drag a new in from the Entity Browser
I.  Place it where you want to withdraw money
J.  Once again change the "cursorhint" value to "HINT_NOICON"
K. Change the "targetname" value to "withdraw_trig"
L. Compile and run your map before moving onto Part 3

Part 3: Sounds(optional)
A. Go into your <mapname>.gsc
B. Uncomment(delete "//") the 5 lines that say:
        //player PlayLocalSound("purchase_accept");
        //player PlayLocalSound("purchase_deny");
C. Go into your useraliases.csv which can be found in "Call of Duty Black Ops III\share\raw\sound\aliases"
D. Open useraliases.csv with a text editor(ie. notepad)
E. Paste the following at the bottom(if you already have this then skip this step):

Code Snippet
Plaintext
purchase_accept,,,zombie\purchase\accept\accept_00.wav,,,UIN_MOD,,,,,BUS_FX,,,,,,90,90,0,500,500,,,,,,,,,,,,,,,,3d,front,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,yes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
purchase_deny,,,zombie\purchase\deny\deny_00.wav,,,UIN_MOD,,,,,BUS_FX,,,,,,90,90,0,500,500,,,,,,,,,,,,,,,,3d,front,,NONLOOPING,,,,,,,,,,,,,,,,,,,,,,,,,,,yes,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
F. Download the following sound files:

G. Drag the folder from the zip file into your root folder "Call of Duty Black Ops III"
H. Now compile and run your map!

Please leave a comment if you are having trouble getting it to work.

Update:
Made it easier to install sound files and added description to each part
Extended description and changed some text sizes
7 years ago
After further investigation, it seems that Treyarch isn't allowing us to change the default game scripts yet.

Original post: http://ugx-mods.com/forum/index.php/topic,14354.0.html
7 years ago
How do you make a custom dvar?

When I run this code it crashes my game.

Code Snippet
Plaintext
function bank()
{
    players = GetPlayers();
    for (i = 0;i<players.size;i++)
    {
        players[i].balance = players[i] GetDvarInt("bank_points", 0);
    }
   
    level thread deposit();
    level thread withdraw();
}
I'm trying to use it to make a bank that saves your points between games but I can't get it to work.

Help fixing the dvar or any other way to save a variable between games would be greatly appreciated.
7 years ago
I was wondering if there is a way to add more than just the pack-a-punch camos from one map?

Right now if I want to add the Revelations camos(id 121-125) I just put this in my main function.

Code Snippet
Plaintext
level.pack_a_punch_camo_index = 121;
level.pack_a_punch_camo_index_number_variants = 4;
But if I want to add the Der Eisendrache camos(id 75-80) and the Revelations camos(id 121-125) what do I do?
I can't just put in 75 for the index and 50 for the number of variants because I would get all the camos in between.

I would guess you have to change something in the get_pack_a_punch_camo_index function in _zm_weapons.gsc

Spoiler: click to open...
Code Snippet
Plaintext
function get_pack_a_punch_camo_index( prev_pap_index )
{
if( isdefined(level.pack_a_punch_camo_index_number_variants) )
{
if( isdefined( prev_pap_index ) )
{
camo_variant = prev_pap_index + 1;
if( camo_variant >= (level.pack_a_punch_camo_index+level.pack_a_punch_camo_index_number_variants) )
{
camo_variant = level.pack_a_punch_camo_index;
}
return camo_variant;
}
else
{
camo_variant = randomIntRange( 0, level.pack_a_punch_camo_index_number_variants );
return level.pack_a_punch_camo_index +  camo_variant;
}
}
else
{
return level.pack_a_punch_camo_index;
}
}
7 years ago
Is the table that the weapons go in here?:
Call of Duty Black Ops III\share\raw\gamedata\weapons\zm
8 years ago
Loading ...