Announcement

Collapse
No announcement yet.

Projectiles shooting projectiles

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Projectiles shooting projectiles

    I want to fire a pod that will shoot rockets. I just basically want to know how to make projectiles fir projectiles them selves. I tried to look at the redeemer in the excessive redeemer of the excessive mutator, but didn't help much... Any ways?

    #2
    Check out my clusterredeemer and the minicluster. The napalm cannon on my Napalmcar does it also.

    Comment


      #3
      I believe you have to make sure the projectile is net temporary then set it up the way the gun does (ie movement and physics) and spawn it. You should remember to set the instigator to the instigator of the original projectile.

      I had a projectile a while back theat on impact spawned more projectiles (a good place to look at would be the bio goop )

      Comment


        #4
        The flakshell also shoots projectiles on impact. It's coded inside its explode() function.

        Comment


          #5
          Originally posted by ghouck View Post
          Check out my clusterredeemer and the minicluster. The napalm cannon on my Napalmcar does it also.
          Wow! Nice gun!!! Anyway thx for the tip. Now I need to make my projectile explode in the air after a second the pod is launched. I need to know how to config the timer() function any tips?

          Comment


            #6
            how about rightclick to make it explode when you want. (grenade launcher/redeemer for tips)

            Comment


              #7
              Originally posted by Ace08 View Post
              Wow! Nice gun!!! Anyway thx for the tip. Now I need to make my projectile explode in the air after a second the pod is launched. I need to know how to config the timer() function any tips?
              SetTimer(float time, bool repeat); (repeat set to false means it gets called once, if it's true it calls ever time time has passed)


              Then what you want to happen in:

              function Timer()
              {
              }

              Comment


                #8
                Okay. Now I want to make my projectile guide to a target. I looked at some other codes like the one for the 'excessive redeemer'. The projectile shoots homing rockets when it blows up. Anyway I found the part of the script that tells the rockets to find a home in on the target. These are not my codes so I just want you to help me desipher these to give me a clue about codes. The area in yellow is the place I want you to look at the most.
                Code:
                simulated function Explode(vector HitLocation, vector HitNormal) 
                {
                	local vector start;
                        local vector startshell;
                        local rotator rot;
                        local PlayerStart PS;
                	local int i, k, rp;
                	local Pawn XP;
                	local int SpawnCount;
                
                	start = HitLocation;
                	startShell = HitLocation - 100 * Normal(Velocity);
                	StartShell.Z += 50;
                	
                	SpawnCount=30;
                
                	if ( Role == ROLE_Authority )
                	{
                	     for (i=0; i<SpawnCount; i++)
                	     {
                
                		if ( Role == ROLE_Authority )
                		{
                 		     ValidPoint=False;
                		     k=0;	
                	     
                		     ForEach DynamicActors(class'Pawn',XP)
                	             {
                		         if ( K < 60 )
                			 {
                				RandomPlayer[k]=XP;
                				k++;
                			 }
                			 else
                				continue;
                
                		     }
                		     
                		     rp = frand()*k;
                
                                    if ( Instigator != None )
                		    {
                			if ( Level.Game.bTeamGame && Instigator.PlayerReplicationInfo != None && Instigator.PlayerReplicationInfo.Team != None && RandomPlayer[RP].PlayerReplicationInfo != None && Instigator.PlayerReplicationInfo.Team != RandomPlayer[RP].PlayerReplicationInfo.Team )
                				someRandPoint=RandomPlayer[rp];
                		    
                		        else 
                			        someRandPoint=RandomPlayer[rp];
                		    }
                		    else 
                			        someRandPoint=RandomPlayer[rp];
                	
                		     if ( SomeRandPoint == None )
                                     {
                		         k=0;
                		         ForEach AllActors(class'PlayerStart',PS)
                		         {
                		             randPlayerStart[k]=PS;
                		             k++;
                		         }
                			 rp = frand()*k;
                		         someRandPoint=randPlayerStart[rp];
                		     }
                		     rot = Rotation;
                		     rot.yaw += FRand()*512000;
                		     rot.pitch += FRand()*512000;
                		     rot.roll += FRand()*512000;
                		     NewShell[i] = Spawn( class 'RedeemerRocketProjEX',, '', StartShell, rot*-1);
                		     NewShell[i].Seeking=someRandPoint;
                		 }
                			
                	     }
                		
                	}
                }

                Comment


                  #9
                  I would look at the homing rockets from UT, it's clean code and you can easily adjust how tightly they home

                  Comment


                    #10
                    Look at the Leviathan rockets for the easiest solution (that I know).

                    Comment


                      #11
                      One of the weapons on my Air Defense Truck has homing rockets, It is AirDefGunD. If you need, I can send you some of the code, and maybe point out what does what, there is a little extra stuff in there.

                      Comment

                      Working...
                      X