For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

Change AirControl per map

The section related to UnrealScript and modding. This board is for coders to discuss and exchange experiences or ask questions.
Post Reply
User avatar
w[ch7465]-w[ch959][ch617]v[ch7431][ch628]
OldUnreal Member
Posts: 42
Joined: Tue Mar 20, 2007 10:33 am

Change AirControl per map

Post by w[ch7465]-w[ch959][ch617]v[ch7431][ch628] »

I was stuck a couple of day ago, with a big space map, Unreal doesn't have enough air control to do things like say, prevent yourself from being thrown into deep space whenever you walk on a jump pad at a slight angle.

So, here's my solution to altering AirControl and AirSpeed for my level.

1. Create a subclass of ZoneInfo called MyZoneInfo.
2. Paste this code into it:

Code: Select all

//=============================================================================
// MyZoneInfo.
//=============================================================================
      
      class MyZoneInfo expands ZoneInfo;
      
//=============================================================================
      
      // When an actor enters this zone.
      event ActorEntered(actor Other) {
            local Pawn Current; Current = Pawn(Other);
            
            // Call the usual event:
            Super.ActorEntered(Other);
            
            // Only change when defaults are being used:
            if (Current.AirSpeed != Current.default.AirSpeed) return;
            if (Current.AirControl != Current.default.AirControl) return;
            
            // These should not affect already modified pawns:
            Current.AirSpeed = Current.default.AirSpeed * 2;
            Current.AirControl = Current.default.AirControl * 8;
      }
      
      // When an actor leaves this zone.
      event ActorLeaving(actor Other) {
            local Pawn Current; Current = Pawn(Other);
            
            // Call the usual event:
            Super.ActorLeaving(Other);
            
            // Reset AirSpeed and AirControl for each pawn:
            Current.AirSpeed = Current.default.AirSpeed;
            Current.AirControl = Current.default.AirControl;
      }
      
//=============================================================================
3. Compile and Save in MyLevel.

Thats it! Although you might want to change the AirSpeed and AirControl multipliers, they are only configured for my map.
User avatar
Pitbull
Administrator
Posts: 1226
Joined: Fri Oct 04, 2002 6:47 pm
Location: Between Venus and Mars

Re: Change AirControl per map

Post by Pitbull »

Here is Bozo's script which he posted in the Unreal Ed section.

Code: Select all

//=============================================================================
// EnhancedAirControlZone.
// Gerald Lance Tindall aka. {KDS}BOZO
// CODE NOT FOR REUSE WITHOUT PRIOR PERMISSION OF THE AUTHOR
//=============================================================================
class EnhancedAirControlZone extends ZoneInfo;

var() float ZoneAirControlValue;

// When an actor enters this zone.
event ActorEntered( actor Other )
{
   if( Pawn(Other)!=None )
   {
      Pawn(Other).AirControl=FMax(ZoneAirControlValue,Pawn(Other).default.AirControl);
   }// endif

   Super.ActorEntered(Other);

}// end event EnhancedAirControlZone.ActorEntered


// When an actor leaves this zone.
event ActorLeaving( actor Other )
{
   if( Pawn(Other)!=None )
   {
      Pawn(Other).AirControl=Pawn(Other).default.AirControl;
   }// endif

   Super.ActorLeaving(Other);

}// end event EnhancedAirControlZone.ActorLeaving


defaultproperties
{
   ZoneAirControlValue=0.25

      ZoneGravity=(Z=-950.000000)
      ZoneGroundFriction=4.000000
      ZoneFluidFriction=1.200000
      ZoneTerminalVelocity=2500.000000
      MaxCarcasses=2
      bMoveProjectiles=True
      AmbientSaturation=255
      TexUPanSpeed=1.000000
      TexVPanSpeed=1.000000
      SpeedOfSound=8000.000000
      MasterGain=100
      CutoffHz=6000
      Delay(0)=20
      Delay(1)=34
      Gain(0)=150
      Gain(1)=70
      MinLightCount=6
      MaxLightCount=6
      MinLightingPolyCount=1000
      MaxLightingPolyCount=5000
      bStatic=True
      bNoDelete=True
      Texture=Texture'Engine.S_ZoneInfo'
      bAlwaysRelevant=True

}// end EnhancedAirControlZOne:defaultproperties 
Upon this rock I will build my church O:-)

LOADING HATERS..████████████] 99% Complete.
Post Reply

Return to “UScript Board”