Modme Forums

BO4 Carpenter Scripting help

Game Modding | Call of Duty: Black Ops 3 | Scripting


Tanhasson:

Can anyone help me with a script for the BO4 Carpenter where it repairs your shield? I will be using Sphinx's Tranzit shield.


Pepergogo:

You can try using the shield repair script that Madgaz use in his Crusader Ale perk.
Then that part implement in the carpinter powerup and that should work.
I don't how to actually do it, but it's just an idea


Tanhasson:

You can try using the shield repair script that Madgaz use in his Crusader Ale perk.
Then that part implement in the carpinter powerup and that should work.
I don't how to actually do it, but it's just an idea

Good idea thanks! ill look into it!


Tanhasson:

this is what i came up with, it definitely didn't work. If anyone could take look at it i would appreciate it.

level thread carpenter_upgrade ();

#using scripts\zm\_zm_weap_riotshield;

function carpenter_upgrade()
{
while(1)
{
level waittill( "zmb_carpenter_level" );
//IPrintinLnBold("Carpenter");
foreach(player in GetPlayer())
{
skip = 1;
primary_weapons = self getWeaponsList( 1 );
foreach ( weap in primary_weapons )
{
if( weap.name == "zod_riotshield" )
skip = 0;
}
if ( !skip )
{
playLocalSound( "repair_tick" );
riotshield::layer_damage_shield( -1500 );
giveMaxAmmo( "_zm_craft_zombie_shield" );
}
}
}
}


Spiki:

This works on the zod shield

function carpenter()
{

while(1)
    {
    level waittill("carpenter_finished");
    
    foreach(player in GetPlayers())
        {
        if(!IS_TRUE(player.hasRiotShield))
            continue;
        
        IPrintLnBold("fix shield");
        equip = player.weaponRiotshield;

        player zm_equipment::take( equip ); //cuz it skips in give
        player zm_equipment::give( equip );
        player clientfield::set_player_uimodel( "zmInventory.shield_health", 1.0 );
        }
    }

}


Tanhasson:

This works on the zod shield

function carpenter()
{

while(1)
    {
    level waittill("carpenter_finished");
   
    foreach(player in GetPlayers())
        {
        if(!IS_TRUE(player.hasRiotShield))
            continue;
       
        IPrintLnBold("fix shield");
        equip = player.weaponRiotshield;

        player zm_equipment::take( equip ); //cuz it skips in give
        player zm_equipment::give( equip );
        player clientfield::set_player_uimodel( "zmInventory.shield_health", 1.0 );
        }
    }

}

that gives me this error

UNRECOVERABLE ERROR:

^1SCRIPT ERROR: No generated data for 'scripts/zm/zm_usermap.gsc'

ERR(6E) scripts/zm/zm_usermap.gsc (153,1) : Compiler Internal Error : Unresolved external 'zm_equipment::take'


CrazyBullen:

that gives me this error

UNRECOVERABLE ERROR:

^1SCRIPT ERROR: No generated data for 'scripts/zm/zm_usermap.gsc'

ERR(6E) scripts/zm/zm_usermap.gsc (153,1) : Compiler Internal Error : Unresolved external 'zm_equipment::take'


I got that error too :/ Would be awesome if it would work, I making a new Tower map and the shield will repair from both full ammo and every new round.


Atchfam77:

I saw a release by FrostIceforge with something similar to what you're looking for. He has compatibility with that exact Tranzit shield too. Here's the link if you want to take a look at it.

https://forum.modme.co/threads/drag-drop-bo4-carpenter-shield-repair.3157/


CrazyBullen:

Just needed to put #using scripts\zm\_zm_equipment; at the top of your gsc with the other usings.


Pepergogo:

Just needed to put #using scripts\zm\_zm_equipment; at the top of your gsc with the other usings.

Yes