Announcement

Collapse
No announcement yet.

Help with my Mutator

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

    Help with my Mutator

    Here's some problems i seem to be having with my mutator that i can't figure out...

    1. How to make bullet decals/dropped weapons stay longer.(Solved Thanks Angel_Mapper)
    2. how to make players drop all their inventory items when they die.(Nevermind, thought i did)
    3. How do you draw custom sniper scope textures?(Solved Thanks TOP-Proto)
    4. Does anyone know how i can set zoom modes to instantly zoom to like 2x and 5x instead of holding the zoom button?(Solved Thanks T-Bone7)
    5. How does the transient volume work? When i set it to 10,000 or 50, the volume stays the same, is there anyway to make one sound effect louder? If not, is there a sound editing program that lets me do this?(Solved Thanks T-Bone7)
    6. How can i make a bullet sound so that when it goes by a player, if they're within the transientvolumeradius, it will play a sound?


    thanks!

    btw, if any of you ppl that helped would like a G-mail account, email me at dsslayer1210@gmail.com and i'll hook u up w/ an invite (i only have 50 left)

    #2
    Those mean that it can't access 'bullet', either it wasn't spawned correctly or the reference to it is invalid.

    Before trying to access it you should make sure it's there:

    This is bad:
    Code:
    Bullet.Whatever = Something;
    This is good:
    Code:
    if(Bullet != None)
        Bullet.Whatever = Something;

    Comment


      #3
      so nothing would be wrong but i just wouldn't see the "bullet" right?

      ok i'm gonna go find this "bullet" now

      Comment


        #4
        ok i figured out what the problem was, i made up some stupid code
        Code:
             local BulletDecal bullet;
        	bullet.LifeSpan = 115;
        but i fixed it by deleting it...

        does anyone know how i can make the lifespan of the bullet decal longer with out trying to do the above?

        i tried making it
        Code:
             local BulletDecal bullet;
        	
        	if(bullet != none)
        	bullet.LifeSpan = 115;
        but it doesn't seem to work

        thanks

        Comment


          #5
          You have to spawn it first.

          Code:
          local BulletDecal Bullet;
          
          Bullet = spawn(class'BulletDecal');
          Bullet.Lifespan = 115;
          The Spawn function is set up like this, so if you wanted it spawned in a specific location you'd put in the optional SpawnLocation:
          Code:
          native(278) final function actor Spawn
          (
          	class<actor>      SpawnClass,
          	optional actor	  SpawnOwner,
          	optional name     SpawnTag,
          	optional vector   SpawnLocation,
          	optional rotator  SpawnRotation
          );

          Comment


            #6
            well i've looked through all the weapon/weapon fire/attachment codes(as best as i could) and i couldn't find where it spawns bulletdecal, or xscorch(the parent class) so i decided to add it into my mut file, that extends mutator

            would i have to make one of those foreach statements and replace it like that?

            Comment


              #7
              bump

              Comment


                #8
                Look harder, it took me ten seconds to find it.

                Code:
                class ClassicSniperFire extends InstantFire;
                
                ...
                
                function DoTrace(Vector Start, Rotator Dir)
                {
                    local SniperWallHitEffect S;
                
                ...
                
                		S = Weapon.Spawn(class'SniperWallHitEffect',,, HitLocation, rotator(-1 * HitNormal));

                Comment


                  #9
                  ooooh they named it something else!!!!
                  stupid me

                  i was looking through the codes and default properties for spawn xscorch or bullet decal

                  thanks

                  Comment


                    #10
                    hmmm, there was a problem with that...
                    the SniperWallHitEffect extends xeffects, which is ok but the bullet decal extends projector, waay at the top

                    am i going to have to use an iterator or something since its not really an effect? Is there a way in which i can just make a simple change in the default properties?

                    Comment


                      #11
                      Code:
                      class SniperWallHitEffect extends Effects;
                      
                      ...
                      
                      simulated function SpawnEffects()
                      {
                      
                      ...
                      
                      		Spawn(class'LongBulletDecal');
                      Code:
                      class LongBulletDecal extends BulletDecal;
                      Code:
                      class BulletDecal extends xScorch;
                      Code:
                      class xScorch extends Projector

                      Comment


                        #12
                        ..... oh

                        Comment


                          #13
                          hehe, you'll get it one day. Trust me. Just stick with it.

                          It's really a lot of "wtf is going on here " followed by some "why doesnt this work?!! " followed by "why does THAT work.. :weird: " and then followed still by some "wtf is this code doing :bulb: " and then, finally, one day, its "oooooooooooooohhhhhhhhhhhhh, i get it! ". Eureka!

                          And then, after you have about 10,000 eureka moments, you'll be able to do some major coding with minimal problems.

                          You know you need a variable, and you know all variables have to be spawned (though it's not always evident in the code). Sometimes they're spawned in some obscure class hidden away in a dark corner somewhere and then ASSIGNED to that variable (mutators like to do this), and sometimes they're spawned using a subclass somewhere with a totally different name.

                          The real key is knowing what to ask. Instead of looking for the specific instance of your class being spawned, think of what spawns your class (a weapon in your case), and try to find that class referenced somewhere (probably a variable, but not always). Then go back and find where that variable is used (likely in base classes), and try and figure it out.

                          Hit effects and projector usage are sort of complicated. They dont last very long because too many projectors will darken static meshes and other actors, which is why they're given such a short lifespan. You also have to be careful what you use them on, because projectors dont move (usually), and so kactors dont accept them, nor do most moving actors. Watching your bullet decals slide off your kactor is quite a humbling experience.

                          Comment


                            #14
                            lol, yea those eureka moments feel great....

                            well so far i've figured out the decal is called spawnbeameffects for stuff like assaultrifle(i think it is at least)

                            so basically i tried to set the class in the default properties to bullet decal, rrrrg stupid bullet decal

                            Comment


                              #15
                              yaay 50 posts

                              Comment

                              Working...
                              X