Announcement

Collapse
No announcement yet.

No Ammo

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

    No Ammo

    Hi Guys

    I've just started taking part in 3dBuzz's UScript 101 class and for the 1st assignemt we need to modify an existing weapon to do something else.

    The example they give in the VTM is they take the ShockRifle, extend it to a "Concussion Rifle" and change a few of it's defaultproperties. Namely the Momentum and damage caused by a hit.

    I figured I would modify the RocketLauncher for my assignment and do the following things:

    - change the damage caused
    - increase the speed of the rocket projectile itself
    - make both fire modes the same
    - change the lock on time
    and
    - reduce the splash damage

    Essentially turning the rocketlauncher into a HSD (Heat Seeking Dumfire ) Stupid name I know

    As for as I can make out in the VTM, buzz and crew go no where near the ammo used, ammo consumption, or ammo type for that matter. However, when I modify a few default properties for the variuos RL scripts all seems OK as it compiles without error and I can summon the item in game.

    There is only one problem, itr doesn't have any ammo, so I can't actually use it?

    The source is below, I am new to this, but I can't see where I'm going wrong? I don't really want to know the answer if it could be helped, more advice as to where the problem lies and a clue as to where the answer would be for me to find myself.

    Thanks in Advance

    Code:
    //********************************************************
    // Heat Seeking/Dumbfire Rocket Launcher Iventory Script
    //********************************************************
    
    class HSDumbfire extends RocketLauncher;
    
    defaultproperties
    
    {
    ItemName="HeatSeeking/Dumbfire Rocket Launcher"
    FireModeClass(0)=HSDumbfire
    FireModeClass(1)=HSDumbfire
    PickUPClass=class'HSDumbfirePickup'
    LockRequiredTime=0.3000
    
    }
    Code:
    //********************************************************
    // Heat Seeking/Dumbfire Rocket Launcher PickUp Script
    //********************************************************
    
    class HSDumbfirePickup extends RocketLauncherPickup;
    
    defaultproperties
    {
     InventoryType=class'HSDumbfire'
     PickupMessage="You got the Heat Seeking/Dumbfire Rocket Laucher."
    
    }
    Code:
    //********************************************************
    // Heat Seeking/Dumbfire Rocket Launcher Fire Script
    //********************************************************
    
    class HSDumbfireFire extends RocketFire;
    
    defaultproperties
    
    {
    ProjectileClass=class'DumbfireProj'
    }
    Code:
    //********************************************************
    // Heat Seeking/Dumbfire Rocket Launcher Projectile Script
    //********************************************************
    
    class DumbfireProj extends RocketProj;
    
    defaultproperties
    
    {
     speed=2000.0
     MaxSpeed=2000.0
     Damage=50.0
     DamageRadius=10.0
     MyDamageType=class'DamTypeDumbfire'
    
    }
    Code:
    //**********************************************************
    // Heat Seeking/Dumbfire Rocket Launcher Kill Message Script
    //**********************************************************
    
    class DamTypeDumbfire extends DamTypeRocket;
    
    defaultproperties
    
    {
     DeathString="%o couldn't outrun %k's heat seeking rocket."
    
    }

    #2
    I think you have not specified a ammo class or ammo usage in your firing script. That may be the root of your problem.

    First, make a new ammo class (expands rocket ammo) and then specify that class as the ammo class, like below:

    in your fire class (HSDumbfireFire) you need to put in default properties:
    AmmoClass=Class'YourMod.YourClass'
    AmmoPerFire=1

    You may also need a ammopickup class to assosiate with your ammo class.

    Hope that helps.

    Comment


      #3
      Thanks for you help dude, it didn't solve my problem for me, but it certainly confirmed what I knew about adding an ammo pack for it.

      I had a look over my code again and found this:

      Code:
      //********************************************************
      // Heat Seeking/Dumbfire Rocket Launcher Iventory Script
      //********************************************************
      class HSDumbfire extends RocketLauncher;
      defaultproperties
      {
      ItemName="HeatSeeking/Dumbfire Rocket Launcher"
      FireModeClass(0)=HSDumbfire
      FireModeClass(1)=HSDumbfire
      PickUPClass=class'HSDumbfirePickup'
      LockRequiredTime=0.3000
      I guess it didn't like that, it should of course read FireModeClass(0)=HSDumbfireFire as I after I made that correct it worked?? :bulb:

      Well that's solved that problem, the weapon appears, has ammo, fires the same on both primary and alt fire, does less damage with a lesser blast raduis (explosion size is still the same tho tbh expected of course) and locks on quicker.

      Only thing I wanted it to do that it doesn't is fly faster, so I guess I'll need to revisit the code again, must be missing something.

      Comment


        #4
        Check the projectile class to see how to increase it's speed.

        Comment


          #5
          Yea, in projectile its speed and maxspeed which control initial and maximum velocity of a projectile.

          Comment


            #6
            Hmm, thought I had that already here:

            Code:
            class DumbfireProj extends RocketProj;
            defaultproperties
            {
             speed=2000.0
             MaxSpeed=2000.0
             Damage=50.0
             DamageRadius=10.0
             MyDamageType=class'DamTypeDumbfire'
            }
            But it seems no matter what I change the speed and maxspeed to it stays the same :weird:

            But I'll check them out again

            Edit: Well I've had a look and it looks to me that I won't get away with this without calling other functions and stuff, which I reckon is probably learning to run b4 I can walk no?

            Comment

            Working...
            X