UGX-Mods

Call of Duty 5: World at War => Help Desk => Scripting => Topic started by: EmpGeneral on October 30, 2016, 08:38:20 pm

Title: DG-2 as Death Machine
Post by: EmpGeneral on October 30, 2016, 08:38:20 pm
Hello guys.So I'm making a zombie map and I want to put the DG-2 as death machine,just like on Call of the Dead.If anyone knows please help

Title: Re: DG-2 as Death Machine
Post by: yomomdog8010 on November 10, 2016, 07:39:09 pm
As far as I know, you probably have to copy the zombiemode_powerups.gsc into your mod. then you would have to edit the script to add a model, fx, and to give you the weapon, and also add the powerup itself. You are also going to need and image for the drop when you get it, just like double points and insta kill. You will also need the model. i do not know how to script so you'll have to go to someone else for that.
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on November 11, 2016, 06:51:08 pm
As far as I know, you probably have to copy the zombiemode_powerups.gsc into your mod. then you would have to edit the script to add a model, fx, and to give you the weapon, and also add the powerup itself. You are also going to need and image for the drop when you get it, just like double points and insta kill. You will also need the model. i do not know how to script so you'll have to go to someone else for that.

This part I kinda know,the problem is the script,I don't understand nothing about it
Title: Re: DG-2 as Death Machine
Post by: AdvancedDecay on December 08, 2016, 12:44:29 am
hi if you could post your deathmachine script and your zombiemode_powerups I could have a look for u and edit it using pastebin
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on December 08, 2016, 02:03:55 am
hi if you could post your deathmachine script and your zombiemode_powerups I could have a look for u and edit it using pastebin

Actually,I don't have a death machine script,because I know nothing about scripting,but I can get one from some other custom maps by opening it IWD fle
Title: Re: DG-2 as Death Machine
Post by: fanmagic on December 08, 2016, 04:35:40 pm
Open _zombiemode_powerups.gsc
search for this
   
Code Snippet
Plaintext
add_zombie_powerup( "carpenter",  	"zombie_carpenter",	&"ZOMBIE_POWERUP_MAX_AMMO");
and add this under it
   
Code Snippet
Plaintext
add_zombie_powerup( "dg", "weapon_usa_tesla", &"DG" );
go to the fuction powerup_grab() and search for this
Code Snippet
Plaintext
case "carpenter":
level thread start_carpenter( self.origin );
players[i] thread powerup_vo("carpenter");
break;
and add this under it
Code Snippet
Plaintext
case "dg":
players[i] thread dg_drop( self );
        break;
go to the fuction nuke_flash() and add this under it
   
Code Snippet
Plaintext
dg_drop( drop_item, player_won )
{
primaryWeapons = self GetWeaponsListPrimaries();
for( i = 0; i < primaryWeapons.size; i++ )
{
self TakeWeapon( primaryWeapons[i] );
}
self giveWeapon( "tesla_gun" );
self switchToWeapon( "tesla_gun" );
self GiveMaxAmmo( "tesla_gun" );
wait (30);
self TakeWeapon("tesla_gun");
self giveWeapon(primaryWeapons[i]);
}
open dlc3_code.gsc and find the function include_powerups() and add this to it
   
Code Snippet
Plaintext
 include_powerup( "dg" );
Title: Re: DG-2 as Death Machine
Post by: AdvancedDecay on December 08, 2016, 07:46:39 pm
Open _zombiemode_powerups.gsc
search for this
   
Code Snippet
Plaintext
add_zombie_powerup( "carpenter",  	"zombie_carpenter",	&"ZOMBIE_POWERUP_MAX_AMMO");
and add this under it
   
Code Snippet
Plaintext
add_zombie_powerup( "dg", "weapon_usa_tesla", &"DG" );
go to the fuction powerup_grab() and search for this
Code Snippet
Plaintext
case "carpenter":
level thread start_carpenter( self.origin );
players[i] thread powerup_vo("carpenter");
break;
and add this under it
Code Snippet
Plaintext
case "dg":
players[i] thread dg_drop( self );
        break;
go to the fuction nuke_flash() and add this under it
   
Code Snippet
Plaintext
dg_drop( drop_item, player_won )
{
primaryWeapons = self GetWeaponsListPrimaries();
for( i = 0; i < primaryWeapons.size; i++ )
{
self TakeWeapon( primaryWeapons[i] );
}
self giveWeapon( "tesla_gun" );
self switchToWeapon( "tesla_gun" );
self GiveMaxAmmo( "tesla_gun" );
wait (30);
self TakeWeapon("tesla_gun");
self giveWeapon(primaryWeapons[i]);
}
open dlc3_code.gsc and find the function include_powerups() and add this to it
   
Code Snippet
Plaintext
 include_powerup( "dg" );

Are You God?! that exactly what I was aout to type... thanks for helping me again
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on December 08, 2016, 08:14:32 pm
Open _zombiemode_powerups.gsc
search for this
   
Code Snippet
Plaintext
add_zombie_powerup( "carpenter",  	"zombie_carpenter",	&"ZOMBIE_POWERUP_MAX_AMMO");
and add this under it
   
Code Snippet
Plaintext
add_zombie_powerup( "dg", "weapon_usa_tesla", &"DG" );
go to the fuction powerup_grab() and search for this
Code Snippet
Plaintext
case "carpenter":
level thread start_carpenter( self.origin );
players[i] thread powerup_vo("carpenter");
break;
and add this under it
Code Snippet
Plaintext
case "dg":
players[i] thread dg_drop( self );
        break;
go to the fuction nuke_flash() and add this under it
   
Code Snippet
Plaintext
dg_drop( drop_item, player_won )
{
primaryWeapons = self GetWeaponsListPrimaries();
for( i = 0; i < primaryWeapons.size; i++ )
{
self TakeWeapon( primaryWeapons[i] );
}
self giveWeapon( "tesla_gun" );
self switchToWeapon( "tesla_gun" );
self GiveMaxAmmo( "tesla_gun" );
wait (30);
self TakeWeapon("tesla_gun");
self giveWeapon(primaryWeapons[i]);
}
open dlc3_code.gsc and find the function include_powerups() and add this to it
   
Code Snippet
Plaintext
 include_powerup( "dg" );


OMG!THANK YOU!Gonna test it right now!
Title: Re: DG-2 as Death Machine
Post by: fanmagic on December 08, 2016, 08:16:55 pm
Are You God?! that exactly what I was aout to type... thanks for helping me again
I'm a God? Ok :D
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on December 08, 2016, 08:32:05 pm
I'm a God? Ok :D

It works man!!Thanks  :D :D.But just one thing:When you get the drop you can't change to your current weapons and when the powerup finish it take all of your weapons
Title: Re: DG-2 as Death Machine
Post by: fanmagic on December 08, 2016, 08:42:17 pm
It works man!!Thanks  :D :D.But just one thing:When you get the drop you can't change to your current weapons and when the powerup finish it take all of your weapons
I thougth that you would like to only have the DG for 30s lol
Do you get your old weapons back after the drop finished?
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on December 09, 2016, 12:03:53 am
I thougth that you would like to only have the DG for 30s lol
Do you get your old weapons back after the drop finished?

No,thats what I said.The drop works fine,it just have this bug.Any idea how to fox it?
Title: Re: DG-2 as Death Machine
Post by: fanmagic on December 09, 2016, 12:38:05 pm
No,thats what I said.The drop works fine,it just have this bug.Any idea how to fox it?
So if you take the drop you would like to replace your current weapon for the DG for the rest of the game? I'm a bit confused  :o
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on December 09, 2016, 02:00:12 pm
So if you take the drop you would like to replace your current weapon for the DG for the rest of the game? I'm a bit confused  :o

No man,the death machine gives you a minigu(or a DG2) but you can alternate to your old weapons,and when the powerup finish you get your weapons back.And that's is not happening in my map,I mean,the DG2 "steal"  your guns
Title: Re: DG-2 as Death Machine
Post by: ItsLowrider5 on February 04, 2017, 01:42:12 am
Open _zombiemode_powerups.gsc
search for this
   
Code Snippet
Plaintext
add_zombie_powerup( "carpenter",  	"zombie_carpenter",	&"ZOMBIE_POWERUP_MAX_AMMO");
and add this under it
   
Code Snippet
Plaintext
add_zombie_powerup( "dg", "weapon_usa_tesla", &"DG" );
go to the fuction powerup_grab() and search for this
Code Snippet
Plaintext
case "carpenter":
level thread start_carpenter( self.origin );
players[i] thread powerup_vo("carpenter");
break;
and add this under it
Code Snippet
Plaintext
case "dg":
players[i] thread dg_drop( self );
        break;
go to the fuction nuke_flash() and add this under it
   
Code Snippet
Plaintext
dg_drop( drop_item, player_won )
{
primaryWeapons = self GetWeaponsListPrimaries();
for( i = 0; i < primaryWeapons.size; i++ )
{
self TakeWeapon( primaryWeapons[i] );
}
self giveWeapon( "tesla_gun" );
self switchToWeapon( "tesla_gun" );
self GiveMaxAmmo( "tesla_gun" );
wait (30);
self TakeWeapon("tesla_gun");
self giveWeapon(primaryWeapons[i]);
}
open dlc3_code.gsc and find the function include_powerups() and add this to it
   
Code Snippet
Plaintext
 include_powerup( "dg" );
We have a problem here: When the powerup finishes, it doesn't return your original weapons
Title: Re: DG-2 as Death Machine
Post by: Harry Bo21 on February 04, 2017, 04:38:11 am
the "lightning Bolt" drop as its "actually" known, doesnt act that way

You keep it until it runs out of ammo, and the shader fades depending on how much ammo you have - it does not just last 30 seconds
Title: Re: DG-2 as Death Machine
Post by: BluntStuffy on February 04, 2017, 07:49:27 am
Code Snippet
Plaintext
dg_drop( drop_item, player_won )
{
primaryWeapons = self GetWeaponsListPrimaries();
for( i = 0; i < primaryWeapons.size; i++ )
{
self TakeWeapon( primaryWeapons[i] );
}
self giveWeapon( "tesla_gun" );
self switchToWeapon( "tesla_gun" );
self GiveMaxAmmo( "tesla_gun" );
wait (30);
self TakeWeapon("tesla_gun");
for( i = 0; i < primaryWeapons.size; i++ )                          // you forgot this for() loop
{
self giveWeapon(primaryWeapons[i]);
}
}

Some things can go wrong with this, like if you pick up a second drop you will end up with the Tesla gun. Or if you pick it up while drinking a perk you will lose your guns.. Stuff like that
Title: Re: DG-2 as Death Machine
Post by: ItsLowrider5 on February 09, 2017, 03:16:58 pm
So if you take the drop you would like to replace your current weapon for the DG for the rest of the game? I'm a bit confused  :o
He's saying he wants it to be like a normal Death Machine drop, where it lasts for 30 seconds and then when it finishes it gives your guns back. The problem is that it doesn't give your weapons back when it finishes.
Title: Re: DG-2 as Death Machine
Post by: EmpGeneral on February 13, 2017, 11:20:41 pm
Code Snippet
Plaintext
dg_drop( drop_item, player_won )
{
primaryWeapons = self GetWeaponsListPrimaries();
for( i = 0; i < primaryWeapons.size; i++ )
{
self TakeWeapon( primaryWeapons[i] );
}
self giveWeapon( "tesla_gun" );
self switchToWeapon( "tesla_gun" );
self GiveMaxAmmo( "tesla_gun" );
wait (30);
self TakeWeapon("tesla_gun");
for( i = 0; i < primaryWeapons.size; i++ )                          // you forgot this for() loop
{
self giveWeapon(primaryWeapons[i]);
}
}

Some things can go wrong with this, like if you pick up a second drop you will end up with the Tesla gun. Or if you pick it up while drinking a perk you will lose your guns.. Stuff like that

Thanks for this Blunt!I'm going to test it and see if the bugs you mentioned really happen.Just a question:Is there a way to add a shader to this powerup?
Title: Re: DG-2 as Death Machine
Post by: HitmanVere on February 14, 2017, 01:19:42 am
Thanks for this Blunt!I'm going to test it and see if the bugs you mentioned really happen.Just a question:Is there a way to add a shader to this powerup?

Easiest way would be taking offsets from BO1 and do setShader on that location, I can take a look at it tomorrow