Oh, I didn't use a local variable, changed now, but same error.
Might as well post whole script.
- Code: Select all
//================================
// Bomb Pack thing
//================================
Class BombPackPickup extends DeusExPickup;
state Activated
{
function Activate()
{
}
function BeginState()
{
local DeusExPlayer player;
local BombPack TheBombPack;
Super.BeginState();
player = DeusExPlayer(Owner);
if (player != None)
{
TheBombPack = Spawn( BombPack,,,Location + (CollisionRadius+BombPack.Default.CollisionRadius+30) * Vector(Rotation) + vect(0,0,1) * 15 );
TheBombPack.TheOwner = player;
TheBombPack.SetTimer(1.0, true);
}
UseOnce();
}
Begin:
}
defaultproperties
{
ItemName="Bomb"
Mesh=LodMesh'DeusExDeco.Trashbag'
CollisionRadius=26.360001
CollisionHeight=26.760000
}
- Code: Select all
//===============================
// BombPack
//===============================
Class BombPack extends CrateExplosiveSmall;
Var int TimeLeft;
Var Pawn TheOwner;
Var float proxRadius;
function Timer()
{
local DeusExPlayer Player;
TimeLeft -= 1;
if(TimeLeft <= 0)
{
TakeDamage(1, DeusExPlayer(TheOwner), Location, vect(0,0,0), 'Shot');
}
foreach RadiusActors(class'DeusExPlayer', Player, proxRadius)
{
if(Player.PlayerReplicationInfo.Team != TheOwner.PlayerReplicationInfo.Team)
{
TakeDamage(1, DeusExPlayer(TheOwner), Location, vect(0,0,0), 'Shot');
}
}
}
defaultproperties
{
TimeLeft=60
proxRadius=80
HitPoints=10
FragType=Class'DeusEx.PaperFragment'
ItemName=";D"
Mesh=LodMesh'DeusExDeco.Trashbag'
CollisionRadius=26.360001
CollisionHeight=26.760000
Mass=30.000000
Buoyancy=40.000000
}
EDIT: I think I didn't include the player's location.
Before I had used it in an NPC. So how would I add the player's location to that line, if that's the case?