Please, someone help in coding

A refuge for those migrating from the fallen DXEditing.com and a place for general discussion relating to Deus Ex editing (coding, mapping, etc).
Post Reply
User avatar
Kelkos
UNATCO
Posts: 214
Joined: Fri Oct 28, 2016 12:54 pm

Please, someone help in coding

Post by Kelkos »

I need to change a code in DeusExWeapon.uc that enabled me to fire with a fast speed after each consecutive shot. For e.g I have my unmodded weapon. It takes up a second to finish the animation, then refires, I want to change that and make sure that the rate of refire is increased regardless of the animation ending.Please. I really need it. Also, for my current weapons, I want a code that makes my weapons fire after each one shot. For example. I'm firing in bursts, and it takes time for the anim to finish, then the weapon refires, can someone give me the delta 2 weapons, with configuration, or send me a code, so I can make my weapons fire in bursts without delay.

To further emphasize my point take a look at delta's code. I want my custom weapon pack to be semi automatic. Like this.

Code: Select all

var() travel bool   SemiAuto;               // if true you need to press the fire button after every single shot. 
Being a soldier isn't just following orders, it's following those orders in the service of a higher cause. When that cause is betrayed, we're not soldiers anymore, just pieces on a chess board dying for the wrong reason.
Cybernetic pig
Illuminati
Posts: 2284
Joined: Thu Mar 08, 2012 3:21 am

Re: Please, someone help in coding

Post by Cybernetic pig »

again, see GMDX.

Code: Select all

else if ( /*bFireMem ||*/ Pawn(Owner).bFire!=0 )
	{
	  //if (DeusExPlayer(Owner)!=none) damn can 'other', not player/scripted fire!?
	  if (DeusExPlayer(Owner)!=None && bFullAuto)  //CyberP: full auto
	  Global.Fire(0);
	  else
	  GotoState('Idle'); //CyberP: semi-auto satisfaction
	  //   else Global.Fire(0);
	}
all weapons behave as semi-auto weapons, unless they are full-auto weapons or have the full-auto weapon mod installed.

Code: Select all

if (bAutomatic)
	{
		GenerateBullet();	// In multiplayer bullets are generated by the client which will let the server know when
		Goto('Begin');
	}
	bFiring = False;
	if ((IsA('WeaponPistol') || IsA('WeaponMiniCrossbow')) && Owner.IsA('DeusExPlayer')) //CyberP: don't wait for the firing animation to finish for these two weapons
	{
	}
	else
	{
	    FinishAnim();
    }
Fire rate is not bound by firing animation for the two specified weapons.
User avatar
Kelkos
UNATCO
Posts: 214
Joined: Fri Oct 28, 2016 12:54 pm

Re: Please, someone help in coding

Post by Kelkos »

How can I change some code in my custom weapon that enables it to fire whenever the fire key is pressed, and doesn't delay between firing individual rounds.
Being a soldier isn't just following orders, it's following those orders in the service of a higher cause. When that cause is betrayed, we're not soldiers anymore, just pieces on a chess board dying for the wrong reason.
Post Reply