The problem is not even this way it works, because im almost sure there must be something syntaxically incorrect, wheres what i have:
shield like actor:
Code: Select all
var Actor TheOwnerOfThis; (the player)
var Actor ProtectionOwner: (the shield)
simulated event Touch(Actor Other)
if(TheOwnerOfThis!=None && Pawn(TheOwnerOfThis).Health<=0)
Destroy();
else if(Pawn(Other).GetTeamNum()==Pawn(TheOwnerOfThis).GetTeamNum() && Pawn(Other).Health>0 && Pawn(Other)!=Pawn(TheOwnerOfThis))
SSSP1=Pawn(Other).spawn(class'DreamsProtectionShield1A', Pawn(Other).Controller,,Pawn(Other).Location);
SSSP1.giveto(Pawn(Other));
SSSP1.ProtectionOwner=self;
SSSP1.TheOriginalOwner=TheOwnerOfThis;
}
Code: Select all
var Actor TheOwnerOfThis;
simulated function Timer()
{
if(Pawn(Owner)!=None && Pawn(Owner).TouchingActor(ProtectionOwner)==false && Pawn(Owner)!=Pawn(TheOriginalOwner))
Destroy();
}
Core.Object
|
+-- Engine.Actor
|
+-- Engine.Inventory
|
+-- Engine.Powerups
|
+-- Engine.Armor
Any ideas? Thanks in advance!
EDIT:SSSP1 is the item, sorry for forgeting that.