Announcement

Collapse
No announcement yet.

A projectile question (including damage-question)...

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

    A projectile question (including damage-question)...

    So is it possible to make i.e. a very slow moving ShockBall and it's damageradius is somewhat 256 UnrealUnits? And the damage would be 150 or something like that...

    #2
    why wouldnt it be possible

    Comment


      #3
      Yes it is possible.

      Comment


        #4
        easily possible

        Comment


          #5
          this what you need to do
          Code:
          class MyShockBall extends ShockProjectile;
          
          defaultproperties
          {
              Speed=500  //this was originally 1150
              MaxSpeed=500 //this was originally 1150=45
              Damage = 159 //default 45
              DamageRadius=256 //default 150
              ComboDamage=200 // self explanatary
              ComboRadius=275  //sefl explanataory
             LifeSpan=10.0 //may want to increase??
          
          }

          Comment


            #6
            OK, thanks. *opens WOTgreal*

            Comment


              #7
              OK, got it in-game...

              The question is, how to make it give damage while it's in the air (not at the moment of colliding)?

              BTW - Can somebody make a modified Shieldgun's skin for me?

              Comment


                #8
                To make damage in the air, you can set the lifetime of the projectile to whatever you want (if it's for example 2 seconds, depending on the projectile speed, it may die after a certain distance). The projectile class will call the deconstruction code when the projectile dies, you may override that function to spawn an explosion effect, play a sound and then call hurtradius(), or you can just call the blowup() function which does all of the above. Or it might even call those functions automatically after it's lifetime has elapsed.

                Comment


                  #9
                  I mean't that how it does damage all the time in the air and blows up in a wall ect...

                  Comment


                    #10
                    You'd probably have to put in

                    Code:
                    simulated function PostBeginPlay()
                    { 
                          Super.PostBeginPlay();
                          GotoState('HurtingOnTheWay');
                    }
                    
                    state HurtingOnTheWay
                    {
                      
                       simulated function Timer()
                       {   
                         if ( Role == ROLE_Authority )
                            HurtRadius(Damage, DamageRadius, MyDamageType, MomentumTransfer, HitLocation );
                       }
                       BeginState:
                             SetTimer(IntervalOfTheHurt,true);
                      
                    }
                    BTW, you should really look into some tutorials and start small

                    Comment


                      #11
                      Or you can do it in Tick(). But the iterator function VisibleCollidingActors called by HurtRadius() is slow and It may be very inefficient to have it called every fraction of a second.

                      Comment

                      Working...
                      X