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

ballistic knife port help

broken avatar :(
Created 12 years ago
by P0rkRoyalz
0 Members and 1 Guest are viewing this topic.
6,028 views
broken avatar :(
×
broken avatar :(
Location: auMelbourne
Date Registered: 6 August 2012
Last active: 7 years ago
Posts
125
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
TMG Modeller and Animator
Signature
Current W.I.P Map
nazi_zombie_ash (the name may change)
Map Progress:
65%

Need help with guns, sounds or models send me a PM
×
P0rkRoyalz's Groups
P0rkRoyalz's Contact & Social Linksa13xm33P0rkRoyalzP0rkRoyalz
ive ported the ballistic knife from black ops (its about half way complete) but i have no idea how or if its even possible to create the ballistic knife projectile blade pickupable from walls, ground zombies ect if that makes sense i can shoot it but i dont know how i could do that and also how could i make it so when i buy the bowie knife it appears in my hand with the ballistic knife like it does in black ops when i buy the bowie knife and "knife" it completely ignores the ballistic knife and knifes with the bowie knife like it would if it were a gun, any help would be appreciated
thankyou
Last Edit: August 12, 2012, 06:44:07 am by P0rkRoyalz
broken avatar :(
×
broken avatar :(
Location: 00USA
Date Registered: 6 November 2011
Last active: 5 years ago
Posts
33
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Screambomb
Signature
×
Paragalor's Groups
Paragalor's Contact & Social LinksparakadeParagalorParagalorcaden.kreppeinParagalor
First off, this is possible. You can change the projectile model in the weapon file for the knife. As for sticking where shot and such, this is much like the crossbow. You're going to have to do a fair amount of scripting. Here's an excerpt from the crossbow gsc:

Code Snippet
Plaintext
self.bolt_stuck = false; //init
for (;;)
{
self waittill("projectile_impact", weapon, point, radius);
switch(weapon)
{
case "crossbow_exp":
wait 0.1; //give the sticky func a chance to set the var before checking it
if(self.bolt_stuck != true)
{
time = 2.1;
bolt = spawn("script_model", point);
bolt.angles = self getplayerangles();
bolt setModel("t5_weapon_crossbow_bolt_world_exp1");
bolt thread crossbow_sound(time);
bolt thread crossbow_fx(bolt, time);
wait time;
thread crossbow_explosion_sound(bolt);
PlayFXonTag(level._effect["crossbow_explode"], bolt, "tag_fx");
earthquake(0.4, 1, bolt.origin, 400);
bolt radiusDamage( bolt.origin, int(level.zombie_health * 0.8), int(level.zombie_health * 1.5), 350, self, "MOD_GRENADE");
bolt hide();
bolt notify("death");
}
break;
}
}

We can fairly easily modify this for purposes of the ballistic knife:

Code Snippet
Plaintext
for (;;)
{
self waittill("projectile_impact", weapon, point, radius);
switch(weapon)
{
case "ballistic_knife":
wait 0.1;
knife = spawn("script_model", point);
knife.angles = self getplayerangles();
knife setModel( **knife model name here** );
trig = spawn("trigger_radius", point, 0, 40, 40);
trig waittill("trigger", player);
current_ammo = getWeaponAmmoStock("ballistic_knife");
max_ammo = 5 // (for the sake of argument, the max ammo is 5)
if(current_ammo < max_ammo){
ammo_to_add = current_ammo + 1;
player setWeaponAmmoStock("ballistic_knife", ammo_to_add);
knife hide();
knife delete();
}else{
// keep the pickup available for another time
}
break;
}
}

You can just thread that somewhere and it should be okay.

As for the Bowie knife showing up when you acquire it, that's simply a matter of detecting if you have the knife and changing the model, which could just be a whole other weapon. Like so:

Code Snippet
Plaintext
for (;;)
{
players = get_players();
for(i = 0; i < players.size; i++){
if(players[i] hasPerk("specialty_altmelee") && players[i] hasWeapon("ballistic_knife")){
players[i] takeWeapon("ballistic_knife");
players[i] giveWeapon("ballistic_knife_bowie");
}
}
}

That's about it. ;D
broken avatar :(
×
broken avatar :(
Location: auMelbourne
Date Registered: 6 August 2012
Last active: 7 years ago
Posts
125
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
TMG Modeller and Animator
×
P0rkRoyalz's Groups
P0rkRoyalz's Contact & Social Linksa13xm33P0rkRoyalzP0rkRoyalz
thanks for that I had no idea where to start, if I need some help I'll let you know
broken avatar :(
×
broken avatar :(
Location: 00USA
Date Registered: 6 November 2011
Last active: 5 years ago
Posts
33
Respect
Forum Rank
Legless Crawler
Primary Group
Member
My Contact & Social Links
More
Personal Quote
Screambomb
×
Paragalor's Groups
Paragalor's Contact & Social LinksparakadeParagalorParagalorcaden.kreppeinParagalor
Thank goodness you actually understand that, and just let me know if you need further assistance. :D
broken avatar :(
×
broken avatar :(
Donator <3
Location: auAustralia
Date Registered: 20 August 2012
Last active: 4 years ago
Posts
337
Respect
Forum Rank
Perk Hacker
Primary Group
Community Mapper
My Groups
More
My Contact & Social Links
More
×
Chunkdogg9's Groups
Donator ♥ Benevolent Soul who has our eternal gratitude and exclusive access to betas and the donator section of the forum.
Community Mapper Has released one or more maps to the UGX-Mods community which have been added to the UGX Map Manager.
Chunkdogg9's Contact & Social LinksChunkdogg9Chunkdogg00Chunkdogg9
so did it work?
broken avatar :(
×
broken avatar :(
Date Registered: 7 August 2012
Last active: 7 years ago
Posts
75
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
knzombiemaster's Contact & Social LinksNiklas3411gangxta987
First off, this is possible. You can change the projectile model in the weapon file for the knife. As for sticking where shot and such, this is much like the crossbow. You're going to have to do a fair amount of scripting. Here's an excerpt from the crossbow gsc:

Code Snippet
Plaintext
self.bolt_stuck = false; //init
for (;;)
{
self waittill("projectile_impact", weapon, point, radius);
switch(weapon)
{
case "crossbow_exp":
wait 0.1; //give the sticky func a chance to set the var before checking it
if(self.bolt_stuck != true)
{
time = 2.1;
bolt = spawn("script_model", point);
bolt.angles = self getplayerangles();
bolt setModel("t5_weapon_crossbow_bolt_world_exp1");
bolt thread crossbow_sound(time);
bolt thread crossbow_fx(bolt, time);
wait time;
thread crossbow_explosion_sound(bolt);
PlayFXonTag(level._effect["crossbow_explode"], bolt, "tag_fx");
earthquake(0.4, 1, bolt.origin, 400);
bolt radiusDamage( bolt.origin, int(level.zombie_health * 0.8), int(level.zombie_health * 1.5), 350, self, "MOD_GRENADE");
bolt hide();
bolt notify("death");
}
break;
}
}

We can fairly easily modify this for purposes of the ballistic knife:

Code Snippet
Plaintext
for (;;)
{
self waittill("projectile_impact", weapon, point, radius);
switch(weapon)
{
case "ballistic_knife":
wait 0.1;
knife = spawn("script_model", point);
knife.angles = self getplayerangles();
knife setModel( **knife model name here** );
trig = spawn("trigger_radius", point, 0, 40, 40);
trig waittill("trigger", player);
current_ammo = getWeaponAmmoStock("ballistic_knife");
max_ammo = 5 // (for the sake of argument, the max ammo is 5)
if(current_ammo < max_ammo){
ammo_to_add = current_ammo + 1;
player setWeaponAmmoStock("ballistic_knife", ammo_to_add);
knife hide();
knife delete();
}else{
// keep the pickup available for another time
}
break;
}
}

You can just thread that somewhere and it should be okay.

As for the Bowie knife showing up when you acquire it, that's simply a matter of detecting if you have the knife and changing the model, which could just be a whole other weapon. Like so:

Code Snippet
Plaintext
for (;;)
{
players = get_players();
for(i = 0; i < players.size; i++){
if(players[i] hasPerk("specialty_altmelee") && players[i] hasWeapon("ballistic_knife")){
players[i] takeWeapon("ballistic_knife");
players[i] giveWeapon("ballistic_knife_bowie");
}
}
}

That's about it. ;D

i cant find the ballistic knife model the normal i jsut find ballistic knife with bowie and i acnt port his one
broken avatar :(
×
broken avatar :(
Location: auMelbourne
Date Registered: 6 August 2012
Last active: 7 years ago
Posts
125
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
TMG Modeller and Animator
×
P0rkRoyalz's Groups
P0rkRoyalz's Contact & Social Linksa13xm33P0rkRoyalzP0rkRoyalz
so did it work?
not yet i havent figured out the problem yet and i need a bit of help from paragalor, when i do ill make a post about it easier for everyone else :)
Last Edit: September 23, 2012, 01:52:08 pm by P0rkRoyalz
broken avatar :(
×
broken avatar :(
Date Registered: 7 August 2012
Last active: 7 years ago
Posts
75
Respect
Forum Rank
Rotting Walker
Primary Group
Member
My Contact & Social Links
More
×
knzombiemaster's Contact & Social LinksNiklas3411gangxta987
not yet i havent figured out the problem yet and i need a bit of help from paragalor, when i do ill make a post about it easier for everyone else :)

how do you port the ballistic knife ??? i cant port it with tombmxxmodelutillis and maya
broken avatar :(
×
broken avatar :(
Location: auMelbourne
Date Registered: 6 August 2012
Last active: 7 years ago
Posts
125
Respect
Forum Rank
Pack-a-Puncher
Primary Group
Member
My Contact & Social Links
More
Personal Quote
TMG Modeller and Animator
×
P0rkRoyalz's Groups
P0rkRoyalz's Contact & Social Linksa13xm33P0rkRoyalzP0rkRoyalz
ignore this post  :lol:
Last Edit: September 29, 2012, 12:22:39 pm by P0rkRoyalz

 
Loading ...