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

[SCRIPT] Akimbo Dual Worldmodels

broken avatar :(
Created 8 years ago
by Scobalula
0 Members and 1 Guest are viewing this topic.
6,718 views
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
Signature
Aye mate you don't know me so y don't you shut tf up ok buddy :)

×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
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.
Scobalula's Contact & Social Links

I didn't see anything released/posted for this, and after porting DW anims for player, I decided to make a quick script for it.

First off, if you're reading this thread, and you are interested in getting the DW player anims, please read Harry's tutorial here on getting the animations from BO1:

http://ugx-mods.com/forum/index.php/topic,9675.0.html


Adding the Scripts


Download the script below.

Make sure to copy the stuff from maps folder to your mod's maps folder, located in root/mods/modname/maps.

Copy _zombiemode.gsc from root\raw\maps if you don't have it in your mods folder.

Open it and add this below the _zombiemode_perks call:

Code Snippet
Plaintext
maps\_zombiemode_dw_attach::init();

So it should look like this:

Code Snippet
Plaintext
 
maps\_zombiemode_blockers_new::init();
maps\_zombiemode_spawner::init();
maps\_zombiemode_powerups::init();
maps\_zombiemode_radio::init();
maps\_zombiemode_perks::init();
maps\_zombiemode_dw_attach::init();
maps\_zombiemode_tesla::init();
maps\_zombiemode_dogs::init();
maps\_zombiemode_bowie::bowie_init();
maps\_zombiemode_cymbal_monkey::init();
maps\_zombiemode_betty::init();
maps\_zombiemode_timer::init();
maps\_zombiemode_auto_turret::init();

Setting up for your weapon.


If we open the _zombiemode_dw_attach.gsc you can add your dw weapons from here.

First, take a look at this:

Code Snippet
Plaintext
level._effect[ "pistol_flash" ] = loadfx ( "weapon/muzzleflashes/standardflashworld" );

We need to precache the fx in order to be used for the muzzleflash.

Next scroll down to the bottom and notice this function:

Code Snippet
Plaintext
DWAttatch()
{
while(1)
{
self.weap_model = GetWeaponModel(self GetCurrentWeapon());
self waittill_any( "weapon_change", "weapon_change_complete" );
self Detach(self.weap_model, "tag_weapon_left");

if((self GetCurrentWeapon() == "mr6_upgraded" || "m1911_upgraded") || IsSubStr(self.weap_model, "dw") || IsSubStr(self GetCurrentWeapon(), "dw"))
self Attach( self.weap_model, "tag_weapon_left" );
}
}

There are 3 ways you can go about this, you can put dw in the name of your weapons (which isn't practical if your non-upgraded isn't dw), you can put dw in the name of the worldmodel which is my favourite way of doing it and means I only have to precache them instead of editing the script fully, or you can manually check for them. I left in the mr6_upgraded and m1911 check for example.

Lastly, we need to set up FX part for our weapons:

Code Snippet
Plaintext
left_hand_muzzleflashes()
{
self endon( "disconnect" );
while( true )
{
self waittill( "weapon_fired" );
switch( self GetCurrentWeapon() ) // Dumped the worldmodel shell ejects for second weapons since it's not worth looking into tbh.
{
case "mr6_upgraded":
self thread play_third_person_fx( level._effect[ "pistol_flash" ], "tag_weapon_left");
break;
case "hs10_upgraded":
self thread play_third_person_fx( level._effect[ "shotgun_flash" ], "tag_weapon_left");
break;
}
}
}

NOTE: If you want, you can use alaurenc9's post below and modify mine to actually spawn the Left World Model to play FX on properly, but for the sake of asset room, I've improvised with tag_weapon_left and used the default Right Worldmodel.

You can see how it's done here, you can copy and paste what's done above, like this for example:

Code Snippet
Plaintext
			case "weap_name":
self thread play_third_person_fx( level._effect[ "FX_ID" ], "tag_weapon_left");
break;

That should be it, credit if you want.

Make to tick the script/s in launcher. If there are any errors/you run into issues let me know. Enjoy.

Credits:

alaurenc9 - Muzzle FX for Second Gun.

Notes:

Spoiler: click to open...

The positing of some things such as FX, Models, etc. might be off, get over it.

The Knifing might look echy if you look closely, but that's it, if you look closely. The model is still attached and I couldn't find a decent way to detach/attach while knifing since for some odd reason the weaponmodel is M1911 while knifing. It's so small i didn't bother anymore than that.






Last Edit: July 23, 2016, 09:25:00 am by Scobalula
broken avatar :(
  • steviewonder87
  • Deleted Member
×
broken avatar :(
steviewonder87
This user is deleted :(
Nice tut +1, Scoba for scripter status by now surely? :P
broken avatar :(
×
broken avatar :(
Location: fi
Date Registered: 25 June 2013
Last active: 8 months ago
Posts
3,997
Respect
1,024Add +1
Forum Rank
Eviscerator
Primary Group
UGX V.I.P.
My Groups
More
My Contact & Social Links
More
×
HitmanVere's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
UGX V.I.P.
UGX V.I.P.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
BO3 Modtools Alpha
BO3 Modtools Alpha
This user has access to the Black Ops 3 Modtools Alpha
If you actually look at the requirements scob has filled them ages ago. You only need a single script released. I really don't know why it takes ages to get the status. Harry took a year to get it :poker: he was even creating the whole Bo2 mod before he had it lol

Because you need to request it:

broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 8 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
Just a quick note, you don't have to precache the world model already in the weapon file. Calling PreCacheItem already automatically precache's the weapon models. You can even look at configstrings and see all the weapon models automatically precached.

Also, want third person left hand muzzleflash?
Last Edit: July 22, 2016, 09:02:10 pm by alaurenc9
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
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.
Scobalula's Contact & Social Links
Just a quick note, you don't have to precache the world model already in the weapon file. Calling PreCacheItem already automatically precache's the weapon models. You can even look at configstrings and see all the weapon models automatically precached.

Also, want third person left hand muzzleflash?

Wasn't aware of that, lol, I've always thought for it to be used in script, it needed to be precached, thanks for clearing that up.

And sure, I was looking into it but you can save me the hassle and I'll add it to op + credit. lol
broken avatar :(
×
broken avatar :(
Location: us
Date Registered: 30 December 2012
Last active: 8 months ago
Posts
577
Respect
Forum Rank
Zombie Enslaver
Primary Group
Community Scripter
My Groups
More
My Contact & Social Links
More
×
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
Code Snippet
Plaintext
left_hand_muzzleflashes()
{
self endon( "disconnect" );
while( true )
{
self waittill( "weapon_fired" );
switch( self GetCurrentWeapon() )
{
case "zombie_colt_upgraded":
self thread play_third_person_fx( level._effect[ "upgraded_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "zombie_colt_elemental":
self thread play_third_person_fx( level._effect[ "elemental_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "cz75dw_zm":
self thread play_third_person_fx( level._effect[ "pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "cz75dw_upgraded_zm":
self thread play_third_person_fx( level._effect[ "upgraded_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "cz75dw_elemental_zm":
self thread play_third_person_fx( level._effect[ "elemental_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;
}
}
}

play_third_person_fx( fx, tag )
{
fx_ent = Spawn( "script_model", self GetTagOrigin( tag ) );
fx_ent.angles = self GetTagAngles( tag );
fx_ent SetModel( "tag_origin" );
fx_ent LinkTo( self, tag, ( 0, 0, 0 ), ( 0, 0, 0 ) );
fx_ent SetInvisibleToPlayer( self, true );
PlayFXOnTag( fx, fx_ent, "tag_origin" );
wait 2;
fx_ent Delete();
}
This is what I did, just played fx that is invisible to the player who is shooting when weapon_fired is notified. And this requires the use of the actual left hand model which I see your just attaching the right one, which won't allow this to work, because this checks for the left hand model joints to play on.
broken avatar :(
×
broken avatar :(
Location: usNew Jersey
Date Registered: 30 July 2013
Last active: 4 weeks ago
Posts
271
Respect
Forum Rank
Mr. Elemental
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
Personal Quote
fk
Signature
iPlay - Facts                               
Hex Tower - Facts
Andromeda - Facts
Octagonal Ascension - Facts
iPlay v2 - Facts
Eclipse - Facts
MW2 Rust - Facts
Gulag - Facts
Decagon - Facts
---------------------------------------------- BO3
Scrapyard - Facts
Rust 2.0 - Facts
Rust MP - Facts
Gulag Again ffs - Facts
Hex Tower - Facts
Octagon - Facts
Decagon - Facts
Cataclysm - Facts
Dome - Bland
×
Psh's Groups
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Psh's Contact & Social LinksAskPshZombiesihaZzRaBieZI_haZzZ_RaBieZz
Because you need to request it:

(Image removed from quote.)

Does this work with mapper? :gusta:
broken avatar :(
×
broken avatar :(
OnionmanVere Bo21
Location: ieu dnt wnt 2 no
Date Registered: 27 September 2013
Last active: 1 year ago
Posts
1,864
Respect
Forum Rank
Zombie Destroyer
Primary Group
Community Mapper
My Groups
More
Personal Quote
ok
×
Scobalula's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Box Mappers Elite
Box Mappers Elite
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.
Scobalula's Contact & Social Links
Code Snippet
Plaintext
left_hand_muzzleflashes()
{
self endon( "disconnect" );
while( true )
{
self waittill( "weapon_fired" );
switch( self GetCurrentWeapon() )
{
case "zombie_colt_upgraded":
self thread play_third_person_fx( level._effect[ "upgraded_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "zombie_colt_elemental":
self thread play_third_person_fx( level._effect[ "elemental_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "cz75dw_zm":
self thread play_third_person_fx( level._effect[ "pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "cz75dw_upgraded_zm":
self thread play_third_person_fx( level._effect[ "upgraded_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;

case "cz75dw_elemental_zm":
self thread play_third_person_fx( level._effect[ "elemental_pistol_worldflash" ], "tag_flash1" );
self thread play_third_person_fx( level._effect[ "pistol_shelleject_world" ], "tag_brass1" );
break;
}
}
}

play_third_person_fx( fx, tag )
{
fx_ent = Spawn( "script_model", self GetTagOrigin( tag ) );
fx_ent.angles = self GetTagAngles( tag );
fx_ent SetModel( "tag_origin" );
fx_ent LinkTo( self, tag, ( 0, 0, 0 ), ( 0, 0, 0 ) );
fx_ent SetInvisibleToPlayer( self, true );
PlayFXOnTag( fx, fx_ent, "tag_origin" );
wait 2;
fx_ent Delete();
}
This is what I did, just played fx that is invisible to the player who is shooting when weapon_fired is notified. And this requires the use of the actual left hand model which I see your just attaching the right one, which won't allow this to work, because this checks for the left hand model joints to play on.

What I done instead is played off tag_weapon_left which looked pretty ok, even with a weapon like HS10 and some others it looked pretty ok, it's slightly off obviously but worked none the less, I'll updated the script and tut in a few minutes, thanks a million btw.

EDIT: Updated
Last Edit: July 22, 2016, 11:53:03 pm by Scobalula
broken avatar :(
×
broken avatar :(
Location: ph
Date Registered: 22 May 2016
Last active: 4 months ago
Posts
225
Respect
Forum Rank
Mr. Elemental
Primary Group
Member
Signature
×
KhelMho's Groups
KhelMho's Contact & Social Links
Scob, i have this Error :-[ I hope you help me out  :)

Code Snippet
Plaintext
----------------------
Game: G_SetupWeaponDef
----------------------
Error:
******* Server script compile error *******
Error: unknown function: (file 'maps/_zombiemode_dw_attach.gsc', line 59)
    self thread play_third_person_fx( level._effect[ "pistol_flash" ], "tag_weapon_left");
                *
************************************
Database: Assets Sync Started
Database: Assets Sync Finished
********************
ERROR: Server script compile error
unknown function
    self thread play_third_person_fx( level._effect[ "pistol_flash" ], "tag_weapon_left");
(see console for details)

I don't know where to put this script, so i just put it on your script, i just add it below.
"_zombiemode_dw_attach.gsc"
  :-\

Code Snippet
Plaintext
left_hand_muzzleflashes()
{
self endon( "disconnect" );
while( true )
{
self waittill( "weapon_fired" );
switch( self GetCurrentWeapon() ) // Dumped the worldmodel shell ejects for second weapons since it's not worth looking into tbh.
{
case "mr6_upgraded":
self thread play_third_person_fx( level._effect[ "pistol_flash" ], "tag_weapon_left");
break;
case "hs10_upgraded":
self thread play_third_person_fx( level._effect[ "shotgun_flash" ], "tag_weapon_left");
break;
}
}
}
broken avatar :(
×
broken avatar :(
Location: nl
Date Registered: 7 March 2016
Last active: 6 years ago
Posts
88
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Love 4 Custom zombies
Signature
My maps:
Pietercity v1.0
Matrix V1.1
×
Pieternba2k's Groups
Pieternba2k's Contact & Social Linksbasketlbalpro-96PieternbaPieternba2kLove4theGame
Hello everyone, I have a hard time getting this to work in game, if someone is willing to help me out,
please add me on discord:

Pieternba2k #9386

as any help would be highly appreciated,
Greetings

 
Loading ...