Moderator: Forum Guards
function ScopeToggle()
{
local DeusExPlayer ChainSawed;
foreach RadiusActors (class 'DeusExPlayer', ChainSawed, 20)
{
if(ChainSawed.PlayerReplicationInfo.Team != DeusExPlayer(Owner).PlayerReplicationInfo.Team)
{
if(ChainSawed != None)
{
ChainSawed.TakeDamage(1000, Pawn(Owner));
}
}
}
DeusExPlayer(Owner).PlayAnim('Attack',, 0.4);
}
~c[A]t~ wrote:There can be such modes as 'Shoot2' and stuff.
hey i was wondering if anybody knows if it is possible to add a melee weapon to an assault rifle, like the grenade launcher that is already on it? because i think it would be cool to have an all pruposes assault rifle which fires bullets, grenades and can stab people with it! if it is possible could you tell me how with a bit of code since i would not know where to start!
simulated function PlaySelectiveFiring()
{
local Pawn aPawn;
local float rnd;
local Name anim;
anim = 'Shoot';
if (bHandToHand)
{
anim = 'ReloadEnd';
}
if (( Level.NetMode == NM_Standalone ) || ( DeusExPlayer(Owner) == DeusExPlayer(GetPlayerPawn())) )
{
if (bAutomatic)
LoopAnim(anim,, 0.1);
else
PlayAnim(anim,,0.1);
}
else if ( Role == ROLE_Authority )
{
for ( aPawn = Level.PawnList; aPawn != None; aPawn = aPawn.nextPawn )
{
if ( aPawn.IsA('DeusExPlayer') && ( DeusExPlayer(Owner) != DeusExPlayer(aPawn) ) )
{
// If they can't see the weapon, don't bother
if ( DeusExPlayer(aPawn).FastTrace( DeusExPlayer(aPawn).Location, Location ))
DeusExPlayer(aPawn).ClientPlayAnimation( Self, anim, 0.1, bAutomatic );
}
}
}
}
function CycleAmmo()
{
if(AmmoType==class'AmmoNone')
{
if (Role == ROLE_Authority)
{
Pawn(Owner).Clientmessage(ItemName$" is now in Bayonet mode");
bHandToHand=True;
Damage=4;
MaxRange=80;
bAutomatic=False;
}
bHandToHand=True;
Damage=4;
MaxRange=80;
bAutomatic=False;
}
else
{
if (Role == ROLE_Authority)
{
Pawn(Owner).Clientmessage(ItemName$" is now in Bayonet mode");
bHandToHand=True;
Damage=Default.Damage;
MaxRange=Default.MaxRange;
bAutomatic=Default.bAutomatic;
}
bHandToHand=False;
Damage=Default.Damage;
MaxRange=Default.MaxRange;
bAutomatic=Default.bAutomatic;
Super.CycleAmmo();
}
}