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

Fireaxe (prefab+script)

broken avatar :(
Created 1 year ago
by B0hnez
0 Members and 1 Guest are viewing this topic.
428 views
broken avatar :(
×
broken avatar :(
Location: deBrandenburg,DE
Date Registered: 9 May 2019
Last active: 22 hours ago
Posts
5
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
×
B0hnez's Groups
B0hnez's Contact & Social LinksEl_B0hnezhttps://www.youtube.com/c
Dear Mapper and Modder,
 
i want to share my litte first script with u all.
I scripted a small custom wall weapon.
 
Youtube:  https://www.youtube.com/watch?v=BzXfQVdLrZI
 
The actaul weapon is provided by shippuden1592, thanks for porting the Axe from IW.
 
first you add this lines in your <mapname>.gsc  under level thread DLC3_threadCalls();
Code Snippet
Plaintext
level thread init_fireaxe_upgrade();
level thread fireaxe();

at the end of your <mapname>.gsc add:
Code Snippet
Plaintext
fireaxe(){
    flag_wait( "all_players_connected" );
    trig_axe = GetEnt( "trig_axe", "targetname" );
    glass_1 = GetEnt( "nobroken", "targetname" );
    glass_2 = GetEnt( "broken", "targetname" );
    fireaxe = GetEnt( "fireaxe", "targetname" );
    fireaxe show();
    glass_2 hide();    
    trig_axe SetCursorHint( "HINT_NOICON" );
    trig_axe UseTriggerRequireLookAt();
    trig_axe SetHintString( "Press &&1 To Take" );
    while(1)
    {
        trig_axe waittill( "trigger", player );
        glass_1 hide();
        play_sound_on_ent("bullet_ap_glass");
        glass_2 show();
        player_has_weapon = false;
        weapons = player GetWeaponsList();
        if( IsDefined( weapons ) )
        {
            for( i = 0; i < weapons.size; i++ )
            {
                if( weapons[i] == self.zombie_weapon_upgrade )
                {
                    player_has_weapon = true;
                }
            }
        }
        if( !player_has_weapon )
        {
            player maps\_zombiemode_weapons::weapon_give( self.zombie_weapon_upgrade );
        }
        player iprintlnbold( "weapon taked" );
        fireaxe hide();        
        trig_axe delete();        
    }
}

init_fireaxe_upgrade()
{
    trig_axe_spawns = ;
    trig_axe_spawns = GetEntArray( "trig_axe", "targetname" );
    for( i = 0; i < trig_axe_spawns.size; i++ )
    {
        trig_axe_spawns[i] UseTriggerRequireLookAt();
        trig_axe_spawns[i] thread maps\_zombiemode_weapons::weapon_spawn_think();
    }
}

Dont forget to place the provided prefep in your Map!
 
 
Now the weapon part:
 
Download shippunden1592 IW melee weapon "Axe": https://www.ugx-mods.com/forum/full-weapons/59/infinite-warfare-weapons/23056/
 
Special Thanks to Shippuden1592 for porting the weapons, GimmCity and Phil81334 for looking up my script.
 
Feel free to edit this and make more special Stuff
 
 
--B0hnez
Last Edit: January 11, 2023, 09:13:12 am by B0hnez

 
Loading ...