Auto Fire Gun code help... Plz?

The best and quickest support by a group of top-notch editing specialists, guaranteed!

Moderator: Forum Guards

Auto Fire Gun code help... Plz?

Postby Allan » Sat Apr 08, 06 10:01 pm

//=============================================================================
// WeaponAutoFireGun.
//=============================================================================
class WeaponAutoFireGun expands WeaponAssaultGun;

simulated function Actor AcquireTarget()
{
local vector StartTrace, EndTrace, HitLocation, HitNormal;
local Actor hit, retval;
local DeusExPlayer P2;
Local DeusExPlayer P3;
local ScriptedPawn p;

Super.AcquireTarget();

P3=DeusExPlayer(Owner);
If (Hit.IsA('p')&&((P.Alliance.InitialAlliances[0].AllianceLevel<=-0.1&&P.Alliance.InitialAlliances[0].AllianceName=="Player")||(P.Alliance.InitialAlliances[1].AllianceLevel<=-0.1&&P.Alliance.Initialalliances[1].AllianceName=="Player")) &&P.bInvincible!=True)
{
GoToState('NormalFire');
}
if (Hit.Isa('P2')&&P2.PlayerReplicationInfo.Team!=P3.PlayerReplicationInfo.Team)
{
GoToState('NormalFire');
}
}


Ok, to explain. I thought that i would make some rather hacky weapons for DX, as most of SuperModv1 is not all that new to me(Apart from the Replication to clients part, that was a bit of a pain.). Anyway, i thought a weapon that checks a Pawn's status relative to the player(Is it friend or foe?), and fires if they are an enemy. However, it is proving a bit of a bastard, as the code is not compiling, thanks to the bit in bold... Anyone care to help me out of this??? (Again...)
User avatar
Allan
Alpha
 
Posts: 4545
Joined: Wed Dec 21, 05 1:41 pm
Location: Northamptonshire, England.

Return to Editing issues

Who is online

Users browsing this forum: No registered users and 55 guests