[UT2004] making an ASVehicle kill upon explosion

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

AlphaOne

Unreal coder
Nov 5, 2001
40
0
0
Canada
Visit site
I'm making a strangelove 'vehicle'. Right now it extends the ASVehicle_SpaceFighter_Human since it provides all the dirty movement code that I would not like to code.

My problem is that I can't make it kill people upon explosion(after collision with anything), yet NOT kill my teammates, and even decrease my score!

Ok, I even tried spawing a redeemer missile and letting it explode. It still lets me kill my teammates o_O.

Code:
class MyVehicle class extends ASVehicle_SpaceFighter_Human; 

.... 

state Dying 
{ 
   function BeginState() 
   { 

       local RedeemerProjectile RP; 

       RP = spawn(class'RedeemerProjectile',,,Location,Rotation); 
       RP.bHidden = true; 
       RP.Team = Instigator.GetTeamNum(); 
       RP.Instigator = Instigator; 
       if(Instigator != none) 
       { 
           RP.InstigatorController = Instigator.Controller; 
       } 
       else 
       { 
           log(Self@"No instigator"); 
       } 
       RP.BlowUp(Location); 
   } 
}

This just stubbornly kills all players. If they happen to be on my team, I loose one point for each kill.

It never logs "No instigator, so its all right. I even loose score for killing my team mates :(

I have tried extending the ONSVehicle because I know that they have better support for this kind of thing, but that means that I have to write my own replication code from scratch, and I have to actually make it fly.