| Home Page | Recent Changes | Preferences

# MythOpus/CustomActors

### MythOpus' Custom Actors

THese are a few of my custom actors.

## Speed Spot / Speed Volume

Speed Spot will increase the speed of a player to the Number set in SpeedAdjust when it enters it's collision. When it leaves it, it's speed will be switched to the SpeedRevert number. Also, when a player enters the collision, a speed effect will be placed on it.

    //=====================================================================================
    // SpeedSpot
    //=====================================================================================

    class SpeedSpot extends Actor
    placeable;

    var (SpeedSpot) int SpeedAdjust, SpeedRevert;//SpeedAdjust is what the players speed will go to when they activate.
                                                 //SpeedRevert what players speed will go to when it's deactivated.
    var xEmitter LeftTrail, RightTrail;

    function Touch(Actor Other )
    {
      local xPawn x;
      x = xPawn(Other);

      if(x != None)
      {
       x.GroundSpeed = SpeedAdjust;
      }

      LeftTrail = Spawn(class'SpeedTrail', x,, x.Location, x.Rotation);
      x.AttachToBone(LeftTrail, 'lfoot');

      RightTrail = Spawn(class'SpeedTrail', x,, x.Location, x.Rotation);
      x.AttachToBone(RightTrail, 'rfoot');

    }

    function Untouch(Actor Other )
    {
      local xPawn x;
      x = xPawn(Other);

      if(x != None)
      {
       x.GroundSpeed = SpeedRevert;
      }

      if (LeftTrail != None)
      LeftTrail.Destroy();

      if (RightTrail != None)
      RightTrail.Destroy();

    }

    DefaultProperties
    {
        CollisionRadius=512.000000
        CollisionHeight=512.000000
        bCollideActors=True
        bCollideWorld=True
        SpeedAdjust=1024.000000
        SpeedRevert=440.000000
    }

Speed Volume is volume that will do the same as the above but is more useful

    class SpeedVolume extends Volume
    notplaceable;

    var (SpeedVolume) int SpeedAdjust, SpeedRevert; //SpeedAdjust is what the players speed will go to when they activate.
                                                    //SpeedRevert what players speed will go to when it's deactivated.
    var xEmitter LeftTrail, RightTrail;

    function Touch(Actor Other )
    {
      local xPawn x;
      x = xPawn(Other);

      if(x != None)
      {
       x.GroundSpeed = SpeedAdjust;
      }

      LeftTrail = Spawn(class'SpeedTrail', x,, x.Location, x.Rotation);
      x.AttachToBone(LeftTrail, 'lfoot');

      RightTrail = Spawn(class'SpeedTrail', x,, x.Location, x.Rotation);
      x.AttachToBone(RightTrail, 'rfoot');

    }

    function Untouch(Actor Other )
    {
      local xPawn x;
      x = xPawn(Other);

      if(x != None)
      {
       x.GroundSpeed = SpeedRevert;
      }

      if (LeftTrail != None)
      LeftTrail.Destroy();

      if (RightTrail != None)
      RightTrail.Destroy();

    }

    DefaultProperties
    {
        bCollideActors=True
        bCollideWorld=True
        SpeedAdjust=1024.000000
        SpeedRevert=440.000000
    }

Known Bugs: When a player shoots while under the speed adjust, the speed effect will stick to them when they get out of it.

The Unreal Engine Documentation Site

Wiki Community

Topic Categories

Image Uploads

Random Page

Recent Changes

Offline Wiki

Unreal Engine

Console Commands

Terminology

Mapping Topics

Mapping Lessons

UnrealEd Interface

Questions&Answers

Scripting Topics

Scripting Lessons

Making Mods

Class Tree

Questions&Answers

Modeling Topics

Questions&Answers

Log In