Announcement

Collapse
No announcement yet.

Howto change vehicle emitters?

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

    Howto change vehicle emitters?

    How would i go upon creating a mutator that changes the trail of, the raptor for example, to a custom emitter that i can make in UED?

    #2
    bump

    Comment


      #3
      I would also like to know this I can't find any emitter in the vehicle class+children. I would like to change the dust that is emitted by the SVehicle tires.

      Please don't tell us that it is hard coded. That would have been a mistake.

      Comment


        #4
        seems to me that you would have to make a vehicle class that extends the vehicle class of the raptor, and have the emitter changed in the default properties, then the mutator would change the vehicle factory to spawn your vehicle.

        Other than that you would have to write a script that constantly checks to see if that vehicle was spawned and change it then? I guess this could be done but would be more complex. I dunno if a mutator could do it.

        Comment


          #5
          i hard code all my emitters for vehicles. Sorry, but it takes a few gtrys and is gaurenteed to work. You can try copying the properties, but if u just copy an existing emitter with a similar effect is makes ur life MUCH easier. There may be summin with the particle editor update in the latest patch....

          Comment


            #6
            I thought I posted a reply to this,

            you can use the 'function bool CanEnterVehicle(Vehicle V, Pawn P)'
            from the mutator class to set the emiiters of any vehicle that you try to enter, I'll let you figure it form there, if you can't I'll show you how, it's real easy

            Comment


              #7
              I don't want to do a Mutator cuse' that is another thing for the end user to load.

              I wanted the emitter to be hard codded into the KV itself.

              Just as soon as I posted this I found most of the info I needed.

              The Emitter is 'ONSDirtSlipEffect' it is hard coded in ONSWheeledCraft-
              Code:
              simulated event DrivingStatusChanged()
              {
              
              ....
              
                      for(i=0; i<Wheels.Length; i++)
                      if (Dust[i] == None)
                          {
                      		// Create wheel dust emitters.
                      		WheelCoords = GetBoneCoords(Wheels[i].BoneName);
                      		Dust[i] = spawn(class'ONSDirtSlipEffect', self,, WheelCoords.Origin + ((vect(0,0,-1) * Wheels[i].WheelRadius) >> Rotation));
                      		Dust[i].SetBase(self);
              			    Dust[i].SetDirtColor( Level.DustColor );
                      	}
              
              .....
              As you can see the Actor is hard coded, bad oop Epic...


              So, what I did is made my own emitter actor and added my own DrivingStatusChanged() event

              Code:
              simulated event DrivingStatusChanged()
              {
              	local int i;
              	local Coords WheelCoords;
                  local PlayerController PC;
              
              	PC = Level.GetLocalPlayerController();
              
              	if (bDriving && PC != None && (PC.ViewTarget == None || !(PC.ViewTarget.IsJoinedTo(self))))
                      bDropDetail = (Level.bDropDetail || (Level.DetailMode == DM_Low));
                  else
                      bDropDetail = False;
              
                  if (bDriving)
                      Enable('Tick');
                  else
                      Disable('Tick');
              
              
                  if (bDriving && Level.NetMode != NM_DedicatedServer && !bDropDetail)
              	{
                      iDust.length = Wheels.length;
                      for(i=0; i<Wheels.Length; i++)
                          if (Dust[i] == None)
                          {
                      		// Create wheel dust emitters.
                      		WheelCoords = GetBoneCoords(Wheels[i].BoneName);
                      		iDust[i] = spawn(class'IMP_Dust', self,, WheelCoords.Origin + ((vect(0,0,-1) * Wheels[i].WheelRadius) >> Rotation));
                      		iDust[i].SetBase(self);
              			    iDust[i].SetDirtColor( Level.DustColor );
              
                      	}
              
              		if(bMakeBrakeLights)
              		{
              			for(i=0; i<2; i++)
                  			if (BrakeLight[i] == None)
                  			{
                  				BrakeLight[i] = spawn(class'ONSBrakelightCorona', self,, Location + (BrakeLightOffset[i] >> Rotation) );
                  				BrakeLight[i].SetBase(self);
                  				BrakeLight[i].SetRelativeRotation( rot(0,32768,0) ); // Point lights backwards.
                  				BrakeLight[i].Skins[0] = BrakeLightMaterial;
                  			}
              		}
              	}
                  else
                  {
                      if (Level.NetMode != NM_DedicatedServer)
                  	{
                          for(i=0; i<iDust.Length; i++)
                              iDust[i].Destroy();
              
                          iDust.Length = 0;
              
                          if(bMakeBrakeLights)
                          {
                          	for(i=0; i<2; i++)
                                  if (BrakeLight[i] != None)
                                      BrakeLight[i].Destroy();
                          }
                      }
              
                      TurnDamping = 0.0;
                  }
              }
              Note that there is no Super call so ONSWheeledCraft will not override it.

              But it doesn't work. The iDust[x] is probably the problem.

              Comment


                #8
                I jsut recommended the muator since it's what the thread author wanted.


                On a side note, were you after a different color of dust, or just a diffeent effect, cause there is a level setting that changes the collor of all vehicle dust in Ued (whih I can't run ATM due to newest patch)

                Comment

                Working...
                X