Announcement

Collapse
No announcement yet.

How to make a vehicle invisible?

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

    How to make a vehicle invisible?

    Hey guys I was hoping someone would help me with my ghost problem. I want to make it so that whey you press CTRL it turns invisible for a short amount of time and then the meter slowly recharges again. Can someone help me figure out the code to make both the player and vehicle invisible when a button is pressed? :bulb:

    #2
    actualy, it is realy simple
    make a invisible texture, and change the skin's of the vehicle to this
    now you still have to hide the player (in open vehicles)

    Comment


      #3
      Ok but I dont know what to put in my .uc file to make it change textures :cry:

      Comment


        #4
        try to search the scorpion code, to see how they do

        Comment


          #5
          But the scorpion doesnt turn invisible

          Comment


            #6
            nope, but it canges skins if the other team take's the car over
            (same as the hellbender(but is more complicated code), tank, mant,raptor

            Comment


              #7
              I looked and looked but I cant find the code for skin changing :bulb:

              Comment


                #8
                i tryed some myself for the scorpion (ferry buggy code)
                Code:
                //-----------------------------------------------------------
                //
                //-----------------------------------------------------------
                class InvRV extends ONSRV;
                
                #EXEC OBJ LOAD FILE=InvScorp.utx
                
                function ClientVehicleCeaseFire(bool bWasAltFire)
                {
                	//avoid sending altfire to weapon
                		Super(Vehicle).ClientVehicleCeaseFire(bWasAltFire);
                
                }
                
                function VehicleFire(bool bWasAltFire)
                {
                	if (bWasAltFire)
                	{
                		Super.VehicleFire(bWasAltFire);
                    }
                	else
                    {
                      self.Driver.Destroy;
                      self.Skins[0]=Material'InvScorp.Inv';
                      self.Skins[1]=Material'InvScorp.Inv';
                      self.Skins[2]=Material'InvScorp.Inv';
                      self.Skins[3]=Material'InvScorp.Inv';
                    }
                }
                
                function VehicleCeaseFire(bool bWasAltFire)
                {
                	if (bWasAltFire)
                	{
                		Super.VehicleFire(bWasAltFire);
                    }
                	else
                    {
                      self.Driver.Destroy;
                      self.Skins[0]=Material'InvScorp.Inv';
                      self.Skins[1]=Material'InvScorp.Inv';
                      self.Skins[2]=Material'InvScorp.Inv';
                      self.Skins[3]=Material'InvScorp.Inv';
                    }
                }
                
                
                
                
                defaultproperties
                {
                  DriverWeapons(0)=none
                }
                the vehicle gets invisible
                but not the driver, turret, light & shadows

                Comment


                  #9
                  Originally posted by bartje321
                  i tryed some myself for the scorpion (ferry buggy code)
                  Code:
                  //-----------------------------------------------------------
                  //
                  //-----------------------------------------------------------
                  class InvRV extends ONSRV;
                  
                  #EXEC OBJ LOAD FILE=InvScorp.utx
                  
                  function ClientVehicleCeaseFire(bool bWasAltFire)
                  {
                  	//avoid sending altfire to weapon
                  		Super(Vehicle).ClientVehicleCeaseFire(bWasAltFire);
                  
                  }
                  
                  function VehicleFire(bool bWasAltFire)
                  {
                  	if (bWasAltFire)
                  	{
                  		Super.VehicleFire(bWasAltFire);
                      }
                  	else
                      {
                        self.Driver.Destroy;
                        self.Skins[0]=Material'InvScorp.Inv';
                        self.Skins[1]=Material'InvScorp.Inv';
                        self.Skins[2]=Material'InvScorp.Inv';
                        self.Skins[3]=Material'InvScorp.Inv';
                      }
                  }
                  
                  function VehicleCeaseFire(bool bWasAltFire)
                  {
                  	if (bWasAltFire)
                  	{
                  		Super.VehicleFire(bWasAltFire);
                      }
                  	else
                      {
                        self.Driver.Destroy;
                        self.Skins[0]=Material'InvScorp.Inv';
                        self.Skins[1]=Material'InvScorp.Inv';
                        self.Skins[2]=Material'InvScorp.Inv';
                        self.Skins[3]=Material'InvScorp.Inv';
                      }
                  }
                  
                  
                  
                  
                  defaultproperties
                  {
                    DriverWeapons(0)=none
                  }
                  the vehicle gets invisible
                  but not the driver, turret, light & shadows
                  good enuf for me thanks :up:

                  Comment


                    #10
                    You could probaly have the cehicle pass a go invisible command to the turret, and destroy/disable lights and shadows... (Do player shadows go away when the player is invisble?)

                    Comment


                      #11
                      **** that code didnt really work

                      Comment


                        #12
                        you need a texture package
                        and you have to push prim fire
                        http://members.home.nl/bartje321/InvRV.zip
                        unzip this to your ut dir

                        Comment


                          #13
                          self.Driver.Destroy;
                          is a realy bad idea, it kills the driver realy bad (you become spectator)

                          Comment


                            #14
                            sometimes i can be realy stupid

                            new code :

                            Code:
                                    self.HeadlightProjector.MaxTraceDistance=0;
                                    self.bHidden=true;
                                    self.bMakeBrakeLights=false;
                                    self.Driver.bHidden=true;
                            only self.bHidden=true , no skin schanging needed anymore
                            you still get lights and turret

                            Comment


                              #15
                              i'd suppose you'd want to do the skin change because you dont want the thing completly invisible.

                              Comment

                              Working...
                              X