Announcement

Collapse
No announcement yet.

Custom Vehicle Throws Error "Accessed None 'SeatPawn'"

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

    Custom Vehicle Throws Error "Accessed None 'SeatPawn'"

    Ive created a custom vehicle for unreal, created the package and compiled the script using the code from the manta, its currently placed in a level and is working 99.9%. When i come close to or attempt to enter the vehicle the editor throws the error

    Code:
    Accessed None 'SeatPawn'
    Ive been at this for a couple days now and i cant figure out what the problem is, my code for the _content is as follows.

    Code:
    /**
     * Copyright 1998-2007 Epic Games, Inc. All Rights Reserved.
     */
    
    class UTVehicle_Shuggie_Content extends UTVehicle_Shuggie;
    
    simulated function InitializeEffects()
    {
    	Super.InitializeEffects();
    
    	// we need to do this here as we have a bunch of code that correctly spawns on demand but these are a special case
    	// of needing to exist when ever there is a manta
    	if( VehicleEffects[FanEffectIndex].EffectRef == None )
    	{
    		CreateVehicleEffect( FanEffectIndex );
    	}
    
    	// immediately start and stop the fan effect, causing the blade particle to be left there unmoving so it's not missing
    	//@note: requires a nonzero WarmupTime in the particle system itself
    	if (FanEffectIndex >= 0 && FanEffectIndex < VehicleEffects.Length && VehicleEffects[FanEffectIndex].EffectRef != None)
    	{
    		VehicleEffects[FanEffectIndex].EffectRef.ActivateSystem();
    		VehicleEffects[FanEffectIndex].EffectRef.DeactivateSystem();
    	}
    }
    
    simulated event MantaJumpEffect()
    {
    	PlaySound(JumpSound, true);
    	VehicleEvent('BoostStart');
    }
    
    simulated event MantaDuckEffect()
    {
    	if (bHoldingDuck)
    	{
    		PlaySound(DuckSound, true);
    		VehicleEvent('CrushStart');
    	}
    	else
    	{
    		VehicleEvent('CrushStop');
    	}
    }
    
    simulated function SetVehicleEffectParms(name TriggerName, ParticleSystemComponent PSC)
    {
    	if (TriggerName == 'MantaOnFire')
    	{
    		PSC.SetFloatParameter('smokeamount', 0.95);
    		PSC.SetFloatParameter('fireamount', 0.95);
    	}
    	else
    	{
    		Super.SetVehicleEffectParms(TriggerName, PSC);
    	}
    }
    
    simulated event TakeDamage(int Damage, Controller EventInstigator, vector HitLocation, vector Momentum, class<DamageType> DamageType, optional TraceHitInfo HitInfo, optional Actor DamageCauser)
    {
    	// manta is fragile so it takes momentum even from weapons that don't usually impart it
    	if ( (DamageType == class'UTDmgType_Enforcer') && !IsZero(HitLocation) )
    	{
    		Momentum = (Location - HitLocation) * float(Damage) * 20.0;
    	}
    	Super.TakeDamage(Damage, EventInstigator, HitLocation, Momentum, DamageType, HitInfo, DamageCauser);
    }
    
    function bool Died(Controller Killer, class<DamageType> DamageType, vector HitLocation)
    {
    	VehicleEvent('MantaNormal');
    	return Super.Died(Killer,DamageType,HitLocation);
    }
    
    simulated function DrivingStatusChanged()
    {
    	if ( !bDriving )
    	{
    		VehicleEvent('CrushStop');
    	}
    	Super.DrivingStatusChanged();
    }
    
    simulated function BlowupVehicle()
    {
    	if(WorldInfo.Netmode != NM_DEDICATEDSERVER && VehicleEffects[11].EffectRef != none)
    	{
    		VehicleEffects[11].EffectRef.SetHidden(true); // special case to get rid of the blades
    	}
    	super.BlowUpVehicle();
    }
    
    defaultproperties
    {
       JumpSound=SoundCue'A_Vehicle_Manta.Sounds.A_Vehicle_Manta_JumpCue'
       DuckSound=SoundCue'A_Vehicle_Manta.Sounds.A_Vehicle_Manta_CrouchCue'
       FanEffectIndex=11
       FanEffectParameterName="MantaFanSpin"
       FlameJetEffectParameterName="Jet"
       GroundEffectIndices(0)=12
       GroundEffectIndices(1)=13
       WaterGroundEffect=ParticleSystem'Envy_Level_Effects_2.Vehicle_Water_Effects.PS_Manta_Water_Effects'
       bHasEnemyVehicleSound=True
       Begin Object Name=MyLightEnvironment ObjName=MyLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTVehicle_Manta:MyLightEnvironment'
          ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTVehicle_Manta:MyLightEnvironment'
       End Object
       LightEnvironment=MyLightEnvironment
       Seats(0)=(GunClass=Class'UTVWeap_Shuggie_Gun',GunSocket=("Gun_Socket_01","Gun_Socket_02"),WeaponEffects=((SocketName="Gun_Socket_01",Offset=(X=-35.000000,Y=-3.000000,Z=0.000000),Scale3D=(X=3.000000,Y=6.000000,Z=6.000000)),(SocketName="Gun_Socket_02",Offset=(X=-35.000000,Y=-3.000000,Z=0.000000),Scale3D=(X=3.000000,Y=6.000000,Z=6.000000))),TurretControls=("gun_rotate_lt","gun_rotate_rt"),CameraTag="ViewSocket",CameraBaseOffset=(X=-20.000000,Y=0.000000,Z=10.000000),CameraOffset=-180.000000,bSeatVisible=True,SeatOffset=(X=-30.000000,Y=0.000000,Z=-5.000000),DriverDamageMult=0.750000,SeatIconPOS=(X=0.460000,Y=0.450000))
       VehicleEffects(0)=(EffectStartTag="EngineStart",EffectEndTag="EngineStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Exhaust_Smoke',EffectSocket="Tailpipe_1")
       VehicleEffects(1)=(EffectStartTag="EngineStart",EffectEndTag="EngineStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Exhaust_Smoke',EffectSocket="Tailpipe_2")
       VehicleEffects(2)=(EffectStartTag="BoostStart",EffectEndTag="BoostStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Up_Boost_Jump',EffectSocket="Wing_Lft_Socket")
       VehicleEffects(3)=(EffectStartTag="BoostStart",EffectEndTag="BoostStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Up_Boost_Jump',EffectSocket="Wing_Rt_Socket")
       VehicleEffects(4)=(EffectStartTag="CrushStart",EffectEndTag="CrushStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Down_Boost',EffectSocket="Wing_Lft_Socket")
       VehicleEffects(5)=(EffectStartTag="CrushStart",EffectEndTag="CrushStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Down_Boost',EffectSocket="Wing_Rt_Socket")
       VehicleEffects(6)=(EffectStartTag="MantaWeapon01",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Gun_MuzzleFlash',EffectSocket="Gun_Socket_02")
       VehicleEffects(7)=(EffectStartTag="MantaWeapon02",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Gun_MuzzleFlash',EffectSocket="Gun_Socket_01")
       VehicleEffects(8)=(bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Up_Boost',EffectSocket="Wing_Lft_Socket")
       VehicleEffects(9)=(bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Up_Boost',EffectSocket="Wing_Rt_Socket")
       VehicleEffects(10)=(EffectStartTag="DamageSmoke",EffectEndTag="NoDamageSmoke",EffectTemplate=ParticleSystem'Envy_Effects.Vehicle_Damage.P_Vehicle_Damage_1_Manta',EffectSocket="DamageSmoke01")
       VehicleEffects(11)=(EffectStartTag="EngineStart",EffectEndTag="EngineStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.P_FX_Manta_Blades_Blurred',EffectSocket="BladeSocket")
       VehicleEffects(12)=(EffectStartTag="EngineStart",EffectEndTag="EngineStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Ground_FX',EffectSocket="Wing_Lft_Socket")
       VehicleEffects(13)=(EffectStartTag="EngineStart",EffectEndTag="EngineStop",bRestartRunning=True,EffectTemplate=ParticleSystem'VH_Manta.Effects.PS_Manta_Ground_FX',EffectSocket="Wing_Rt_Socket")
       VehicleEffects(14)=(EffectStartTag="MantaOnFire",EffectEndTag="MantaNormal",bRestartRunning=True,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket="Wing_Lft_Socket")
       VehicleEffects(15)=(EffectStartTag="MantaOnFire",EffectEndTag="MantaNormal",bRestartRunning=True,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket="Wing_Rt_Socket")
       VehicleEffects(16)=(EffectStartTag="MantaOnFire",EffectEndTag="MantaNormal",bRestartRunning=True,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket="Gun_Socket_01")
       VehicleEffects(17)=(EffectStartTag="MantaOnFire",EffectEndTag="MantaNormal",bRestartRunning=True,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket="Gun_Socket_02")
       VehicleEffects(18)=(EffectStartTag="MantaOnFire",EffectEndTag="MantaNormal",bRestartRunning=True,EffectTemplate=ParticleSystem'Envy_Effects.Tests.Effects.P_Vehicle_Damage_1',EffectSocket="ExhaustPort")
       DamageParamScaleLevels(0)=(DamageParamName="Damage1",Scale=1.000000)
       DamageParamScaleLevels(1)=(DamageParamName="Damage2",Scale=1.500000)
       DamageParamScaleLevels(2)=(DamageParamName="Damage3",Scale=1.500000)
       DamageMorphTargets(0)=(MorphNodeName="MorphNodeW_Front",InfluenceBone="Damage_LtCanard",Health=70,DamagePropNames=("Damage2"))
       DamageMorphTargets(1)=(MorphNodeName="MorphNodeW_Right",InfluenceBone="Damage_RtRotor",Health=70,DamagePropNames=("Damage3"))
       DamageMorphTargets(2)=(MorphNodeName="MorphNodeW_Left",InfluenceBone="Damage_LtRotor",Health=70,DamagePropNames=("Damage3"))
       DamageMorphTargets(3)=(MorphNodeName="MorphNodeW_Rear",InfluenceBone="Hatch",Health=70,DamagePropNames=("Damage1"))
       TeamMaterials(0)=MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Blue'
       TeamMaterials(1)=MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Blue'
       BigExplosionTemplates(0)=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P_VH_Death_SMALL_Far',MinDistance=350.000000)
       BigExplosionTemplates(1)=(Template=ParticleSystem'Envy_Effects.VH_Deaths.P_VH_Death_SMALL_Near')
       BigExplosionSocket="VH_Death"
       ExplosionSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Explode'
       Begin Object Class=AudioComponent Name=BaseScrapeSound ObjName=BaseScrapeSound Archetype=AudioComponent'Engine.Default__AudioComponent'
          SoundCue=SoundCue'A_Gameplay.A_Gameplay_Onslaught_MetalScrape01Cue'
          Name="BaseScrapeSound"
          ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
       End Object
       ScrapeSound=BaseScrapeSound
       IconCoords=(U=859.000000,V=0.000000,UL=36.000000,VL=27.000000)
       SpawnMaterialLists(0)=(Materials=(MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue'))
       SpawnMaterialLists(1)=(Materials=(MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue'))
       BurnOutMaterial(0)=MaterialInstanceTimeVarying'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue_BO'
       BurnOutMaterial(1)=MaterialInstanceTimeVarying'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue_BO'
       HoverBoardAttachSockets(0)="HoverAttach00"
       EnemyVehicleSound(0)=SoundNodeWave'A_Character_Reaper.BotStatus.A_BotStatus_Reaper_EnemyManta'
       EnemyVehicleSound(1)=SoundNodeWave'A_Character_Jester.BotStatus.A_BotStatus_Jester_EnemyManta'
       HudCoords=(U=228.000000,V=143.000000,UL=-119.000000,VL=106.000000)
       Begin Object Name=SimObject ObjName=SimObject Archetype=UTVehicleSimHover'UTGame.Default__UTVehicle_Manta:SimObject'
          ObjectArchetype=UTVehicleSimHover'UTGame.Default__UTVehicle_Manta:SimObject'
       End Object
       SimObj=SimObject
       Begin Object Name=RThruster ObjName=RThruster Archetype=UTHoverWheel'UTGame.Default__UTVehicle_Manta:RThruster'
          ObjectArchetype=UTHoverWheel'UTGame.Default__UTVehicle_Manta:RThruster'
       End Object
       Wheels(0)=RThruster
       Begin Object Name=LThruster ObjName=LThruster Archetype=UTHoverWheel'UTGame.Default__UTVehicle_Manta:LThruster'
          ObjectArchetype=UTHoverWheel'UTGame.Default__UTVehicle_Manta:LThruster'
       End Object
       Wheels(1)=LThruster
       Begin Object Name=FThruster ObjName=FThruster Archetype=UTHoverWheel'UTGame.Default__UTVehicle_Manta:FThruster'
          ObjectArchetype=UTHoverWheel'UTGame.Default__UTVehicle_Manta:FThruster'
       End Object
       Wheels(2)=FThruster
       StayUprightConstraintSetup=RB_StayUprightSetup'UTGameContent.Default__UTVehicle_Manta_Content:MyStayUprightSetup_4'
       StayUprightConstraintInstance=RB_ConstraintInstance'UTGameContent.Default__UTVehicle_Manta_Content:MyStayUprightConstraintInstance_4'
       Begin Object Class=AudioComponent Name=MantaEngineSound ObjName=MantaEngineSound Archetype=AudioComponent'Engine.Default__AudioComponent'
          SoundCue=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_EngineLoop'
          Name="MantaEngineSound"
          ObjectArchetype=AudioComponent'Engine.Default__AudioComponent'
       End Object
       EngineSound=MantaEngineSound
       CollisionSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Collide'
       EnterVehicleSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Start'
       ExitVehicleSound=SoundCue'A_Vehicle_Manta.SoundCues.A_Vehicle_Manta_Stop'
       EngineStartOffsetSecs=0.500000
       Begin Object Name=SVehicleMesh ObjName=SVehicleMesh Archetype=SkeletalMeshComponent'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship'
          SkeletalMesh=SkeletalMesh'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship'
          AnimTreeTemplate=AnimTree'VH_Shuggie_Ship.Anims.Shuggie_Ship_AnimTree'
          PhysicsAsset=PhysicsAsset'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship_Physics'
          MorphSets(0)=MorphTargetSet'VH_Manta.Mesh.VH_Manta_MorphTargets'
          ObjectArchetype=SkeletalMeshComponent'UTGame.Default__UTVehicle_Manta:SVehicleMesh'
       End Object
       Mesh=SVehicleMesh
       Begin Object Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTVehicle_Manta:CollisionCylinder'
          CollisionHeight=40.000000
          CollisionRadius=100.000000
          Translation=(X=-40.000000,Y=0.000000,Z=40.000000)
          ObjectArchetype=CylinderComponent'UTGame.Default__UTVehicle_Manta:CollisionCylinder'
       End Object
       CylinderComponent=CollisionCylinder
       Components(0)=CollisionCylinder
       Components(1)=SVehicleMesh
       Components(2)=MyLightEnvironment
       Components(3)=SimObject
       Components(4)=MantaEngineSound
       Components(5)=BaseScrapeSound
       CollisionComponent=SVehicleMesh
       Name="Default__UTVehicle_Manta_Content"
       ObjectArchetype=UTVehicle_Manta'UTGame.Default__UTVehicle_Manta'
    }
    my code background is zero, so i was wondering if someone could tell me what i was doing wrong.

    Thanks for any help

    if this isnt enough to figure out the problem let me know, and i will post the other uc's

    #2
    Never worked with vehicles, but your content code seems to be fine to me. There isn't a SeatPawn in your content class, or any modified entry code so i can't tell what the problem is. Have you modified any entry code or used SeatPawn anywhere in your main code? If so could you please post it here?

    Comment


      #3
      my main code is as follows,

      Code:
      /**
       * Copyright 1998-2008 Epic Games, Inc. All Rights Reserved.
       */
      class UTVehicle_Shuggie extends UTHoverVehicle
      	abstract;
      
      var(Movement)	float	JumpForceMag;
      
      var(Movement)	float	MaxJumpZVel;
      
      /** How far down to trace to check if we can jump */
      var(Movement)   float   JumpCheckTraceDist;
      
      var     float	JumpDelay, LastJumpTime;
      
      var(Movement)   float   DuckForceMag;
      
      var repnotify bool bDoBikeJump;
      var repnotify bool bHoldingDuck;
      var		bool							bPressingAltFire;
      
      var soundcue JumpSound;
      var soundcue DuckSound;
      
      var float BladeBlur, DesiredBladeBlur;
      /** if >= 0, index in VehicleEffects array for fan effect that gets its MantaFanSpin parameter set to BladeBlur */
      var int FanEffectIndex;
      /** parameter name for the fan blur, set to BladeBlur */
      var name FanEffectParameterName;
      
      /** Manta flame jet effect name**/
      var name FlameJetEffectParameterName;
      /** values for setting the FlameJet Particle System **/
      var float FlameJetValue, DesiredFlameJetValue;
      
      /** Suspension height when manta is being driven around normally */
      var(Movement) protected float FullWheelSuspensionTravel;
      
      /** Suspension height when manta is crouching */
      var(Movement) protected float CrouchedWheelSuspensionTravel;
      
      /** controls how fast to interpolate between various suspension heights */
      var(Movement) protected float SuspensionTravelAdjustSpeed;
      
      /** Suspension stiffness when manta is being driven around normally */
      var(Movement) protected float FullWheelSuspensionStiffness;
      
      /** Suspension stiffness when manta is crouching */
      var(Movement) protected float CrouchedWheelSuspensionStiffness;
      
      /** Adjustment for bone offset when changing suspension */
      var  protected float BoneOffsetZAdjust;
      
      /** max speed while crouched */
      var(Movement) float CrouchedAirSpeed;
      
      // (cpptext)
      // (cpptext)
      // (cpptext)
      // (cpptext)
      
      replication
      {
      	if ((!bNetOwner || bDemoRecording) && Role == ROLE_Authority)
      		bDoBikeJump, bHoldingDuck;
      }
      
      simulated function PostBeginPlay()
      {
      	
      }
      
      /**
       * Are we allowing this Pawn to be based on us?
       */
      simulated function bool CanBeBaseForPawn(Pawn APawn)
      {
      	return bCanBeBaseForPawns && !bDriving;
      }
      
      /** DriverEnter()
      Make Pawn P the new driver of this vehicle
      */
      function bool DriverEnter(Pawn P)
      {
      	local Pawn BasedPawn;
      
      	if ( super.DriverEnter(P) )
      	{
      		ForEach BasedActors(class'Pawn', BasedPawn)
      		{
      			if(BasedPawn != Driver)
      			{
      				BasedPawn.JumpOffPawn();
      			}
      		}
      		return true;
      	}
      	return false;
      }
      
      simulated function bool OverrideBeginFire(byte FireModeNum)
      {
      	if (FireModeNum == 1)
      	{
      		bPressingAltFire = true;
      		return true;
      	}
      
      	return false;
      }
      
      simulated function bool OverrideEndFire(byte FireModeNum)
      {
      	if (FireModeNum == 1)
      	{
      		bPressingAltFire = false;
      		return true;
      	}
      
      	return false;
      }
      
      function PossessedBy(Controller C, bool bVehicleTransition)
      {
      	super.PossessedBy(C, bVehicleTransition);
      
      	// reset jump/duck properties
      	bHoldingDuck = false;
      	LastJumpTime = 0;
      	bDoBikeJump = false;
      	bPressingAltFire = false;
      }
      
      simulated event MantaJumpEffect();
      
      simulated event MantaDuckEffect();
      
      //========================================
      // AI Interface
      
      function byte ChooseFireMode()
      {
      	local UTBot B;
      
      	B = UTBot(Controller);
      	if ( B != None
      		&& (B.Skill > 1.7 + FRand())
      		&& Pawn(Controller.Focus) != None
      		&& Vehicle(Controller.Focus) == None
      		&& Controller.MoveTarget == Controller.Focus
      		&& Controller.InLatentExecution(Controller.LATENT_MOVETOWARD)
      		&& VSize(Controller.FocalPoint - Location) < 800
      		&& Controller.LineOfSightTo(Controller.Focus) )
      	{
      		return 1;
      	}
      
      	return 0;
      }
      
      function bool Dodge(eDoubleClickDir DoubleClickMove)
      {
      	Rise = 1;
      	return true;
      }
      
      function IncomingMissile(Projectile P)
      {
      	local UTBot B;
      
      	B = UTBot(Controller);
      	if (B != None && B.Skill > 4.0 + 4.0 * FRand() && VSize(P.Location - Location) < VSize(P.Velocity))
      	{
      		DriverLeave(false);
      	}
      	else
      	{
      		Super.IncomingMissile(P);
      	}
      }
      
      // AI hint
      function bool FastVehicle()
      {
      	return true;
      }
      
      simulated function DrivingStatusChanged()
      {
      	bPressingAltFire = false;
      
      	Super.DrivingStatusChanged();
      }
      
      simulated event ReplicatedEvent(name VarName)
      {
      	if (VarName == 'bDoBikeJump')
      	{
      		MantaJumpEffect();
      	}
      	else if (VarName == 'bHoldingDuck')
      	{
      		MantaDuckEffect();
      	}
      	else
      	{
      		Super.ReplicatedEvent(VarName);
      	}
      }
      
      simulated function float GetChargePower()
      {
      	return FClamp( (WorldInfo.TimeSeconds - LastJumpTime), 0, JumpDelay)/JumpDelay;
      }
      
      simulated event RigidBodyCollision( PrimitiveComponent HitComponent, PrimitiveComponent OtherComponent,
      				const out CollisionImpactData RigidCollisionData, int ContactIndex )
      {
      	// only process rigid body collision if not hitting ground
      	if ( Abs(RigidCollisionData.ContactInfos[0].ContactNormal.Z) < WalkableFloorZ )
      	{
      		super.RigidBodyCollision(HitComponent, OtherComponent, RigidCollisionData, ContactIndex);
      	}
      }
      
      simulated function bool ShouldClamp()
      {
      	return false;
      }
      
      function bool TooCloseToAttack(Actor Other)
      {
      	local float OtherRadius, OtherHeight;
      
      	if (Pawn(Other) != None && Vehicle(Other) == None)
      	{
      		return false;
      	}
      	else if (Super.TooCloseToAttack(Other))
      	{
      		return true;
      	}
      	else
      	{
      		Other.GetBoundingCylinder(OtherRadius, OtherHeight);
      		return (VSize2D(Other.Location - Location) < OtherRadius + CylinderComponent.CollisionRadius + 150.0);
      	}
      }
      
      function bool RecommendCharge(UTBot B, Pawn Enemy)
      {
      	if ( B.Skill < 1 + FRand() )
      	{
      		return false;
      	}
      	if ( Vehicle(Enemy) == None )
      	{
      		return (VSize(Location - Enemy.Location) < 1000.0 + 3000.0*FRand());
      	}
      	return false;
      }	
      
      defaultproperties
      {
         JumpForceMag=7000.000000
         MaxJumpZVel=900.000000
         JumpCheckTraceDist=175.000000
         JumpDelay=3.000000
         DuckForceMag=-350.000000
         FullWheelSuspensionTravel=145.000000
         CrouchedWheelSuspensionTravel=100.000000
         SuspensionTravelAdjustSpeed=100.000000
         FullWheelSuspensionStiffness=20.000000
         CrouchedWheelSuspensionStiffness=40.000000
         BoneOffsetZAdjust=45.000000
         CrouchedAirSpeed=1200.000000
         CustomGravityScaling=0.800000
         FullAirSpeed=1800.000000
         bEjectKilledBodies=True
         bLightArmor=True
         bHomingTarget=True
         bTakeWaterDamageWhileDriving=False
         bRagdollDriverOnDarkwalkerHorn=True
         Begin Object Name=MyLightEnvironment ObjName=MyLightEnvironment Archetype=DynamicLightEnvironmentComponent'UTGame.Default__UTHoverVehicle:MyLightEnvironment'
            ObjectArchetype=DynamicLightEnvironmentComponent'UTGame.Default__UTHoverVehicle:MyLightEnvironment'
         End Object
         LightEnvironment=MyLightEnvironment
         MaxDesireability=0.600000
         ObjectiveGetOutDist=750.000000
         VehicleIndex=6
         VehiclePositionString="in a Manta"
         VehicleNameString="Manta"
         SpawnRadius=125.000000
         DefaultFOV=90.000000
         CameraLag=0.020000
         Begin Object Class=UTVehicleSimHover Name=SimObject ObjName=SimObject Archetype=UTVehicleSimHover'UTGame.Default__UTVehicleSimHover'
            MaxThrustForce=325.000000
            MaxReverseForce=250.000000
            LongDamping=0.300000
            MaxStrafeForce=260.000000
            LatDamping=0.300000
            DirectionChangeForce=375.000000
            TurnTorqueFactor=2500.000000
            TurnTorqueMax=1000.000000
            TurnDamping=0.250000
            MaxYawRate=100000.000000
            PitchTorqueFactor=200.000000
            PitchTorqueMax=18.000000
            PitchDamping=0.100000
            RollTorqueTurnFactor=1000.000000
            RollTorqueStrafeFactor=110.000000
            RollTorqueMax=500.000000
            RollDamping=0.200000
            MaxRandForce=20.000000
            RandForceInterval=0.400000
            WheelSuspensionStiffness=20.000000
            WheelSuspensionDamping=1.000000
            Name="SimObject"
            ObjectArchetype=UTVehicleSimHover'UTGame.Default__UTVehicleSimHover'
         End Object
         SimObj=SimObject
         Begin Object Class=UTHoverWheel Name=RThruster ObjName=RThruster Archetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
            bHoverWheel=True
            SteerFactor=1.000000
            BoneName="Engine"
            BoneOffset=(X=-50.000000,Y=100.000000,Z=-200.000000)
            WheelRadius=10.000000
            SuspensionTravel=145.000000
            LongSlipFactor=0.000000
            LatSlipFactor=0.000000
            HandbrakeLongSlipFactor=0.000000
            HandbrakeLatSlipFactor=0.000000
            Name="RThruster"
            ObjectArchetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
         End Object
         Wheels(0)=RThruster
         Begin Object Class=UTHoverWheel Name=LThruster ObjName=LThruster Archetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
            bHoverWheel=True
            SteerFactor=1.000000
            BoneName="Engine"
            BoneOffset=(X=-50.000000,Y=-100.000000,Z=-200.000000)
            WheelRadius=10.000000
            SuspensionTravel=145.000000
            LongSlipFactor=0.000000
            LatSlipFactor=0.000000
            HandbrakeLongSlipFactor=0.000000
            HandbrakeLatSlipFactor=0.000000
            Name="LThruster"
            ObjectArchetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
         End Object
         Wheels(1)=LThruster
         Begin Object Class=UTHoverWheel Name=FThruster ObjName=FThruster Archetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
            bHoverWheel=True
            SteerFactor=1.000000
            BoneName="Engine"
            BoneOffset=(X=80.000000,Y=0.000000,Z=-200.000000)
            WheelRadius=10.000000
            SuspensionTravel=145.000000
            LongSlipFactor=0.000000
            LatSlipFactor=0.000000
            HandbrakeLongSlipFactor=0.000000
            HandbrakeLatSlipFactor=0.000000
            Name="FThruster"
            ObjectArchetype=UTHoverWheel'UTGame.Default__UTHoverWheel'
         End Object
         Wheels(2)=FThruster
         bStayUpright=True
         bCanFlip=True
         StayUprightRollResistAngle=5.000000
         StayUprightPitchResistAngle=5.000000
         StayUprightStiffness=450.000000
         StayUprightDamping=20.000000
         Begin Object Class=RB_StayUprightSetup Name=MyStayUprightSetup_4 ObjName=MyStayUprightSetup_4 Archetype=RB_StayUprightSetup'UTGame.Default__UTHoverVehicle:MyStayUprightSetup'
            Name="MyStayUprightSetup_4"
            ObjectArchetype=RB_StayUprightSetup'UTGame.Default__UTHoverVehicle:MyStayUprightSetup'
         End Object
         StayUprightConstraintSetup=RB_StayUprightSetup'UTGame.Default__UTVehicle_Manta:MyStayUprightSetup_4'
         Begin Object Class=RB_ConstraintInstance Name=MyStayUprightConstraintInstance_4 ObjName=MyStayUprightConstraintInstance_4 Archetype=RB_ConstraintInstance'UTGame.Default__UTHoverVehicle:MyStayUprightConstraintInstance'
            Name="MyStayUprightConstraintInstance_4"
            ObjectArchetype=RB_ConstraintInstance'UTGame.Default__UTHoverVehicle:MyStayUprightConstraintInstance'
         End Object
         StayUprightConstraintInstance=RB_ConstraintInstance'UTGame.Default__UTVehicle_Manta:MyStayUprightConstraintInstance_4'
         UprightLiftStrength=30.000000
         UprightTorqueStrength=30.000000
         bDriverIsVisible=True
         bTurnInPlace=True
         bFollowLookDir=True
         bScriptedRise=True
         ExitRadius=160.000000
         MomentumMult=3.200000
         bCanStrafe=True
         bCanBeBaseForPawns=True
         MeleeRange=-100.000000
         GroundSpeed=1500.000000
         AirSpeed=1800.000000
         BaseEyeHeight=110.000000
         EyeHeight=110.000000
         Health=200
         Begin Object Name=SVehicleMesh ObjName=SVehicleMesh Archetype=SkeletalMeshComponent'UTGame.Default__UTHoverVehicle:SVehicleMesh'
            ObjectArchetype=SkeletalMeshComponent'UTGame.Default__UTHoverVehicle:SVehicleMesh'
         End Object
         Mesh=SVehicleMesh
         Begin Object Name=CollisionCylinder ObjName=CollisionCylinder Archetype=CylinderComponent'UTGame.Default__UTHoverVehicle:CollisionCylinder'
            ObjectArchetype=CylinderComponent'UTGame.Default__UTHoverVehicle:CollisionCylinder'
         End Object
         CylinderComponent=CollisionCylinder
         Components(0)=CollisionCylinder
         Components(1)=SVehicleMesh
         Components(2)=MyLightEnvironment
         Components(3)=SimObject
         CollisionComponent=SVehicleMesh
         Name="Default__UTVehicle_Manta"
         ObjectArchetype=UTHoverVehicle'UTGame.Default__UTHoverVehicle'
      }
      i have not added a SeatPawn, cause i wouldnt know where to put it if i had to place it in the code, the code has not varied from the original other than the package redirection and renames of classes..

      hope that helps

      Thanks again

      Comment


        #4
        When you make new classes, you don't need to put everything from the previous class in it, as it inherits all of it into your new class. Just put in what you want to be changed and dont put anything from the previous class unless you are modifying that certain thing (ex: change the firing, so use the original fire function). That might be causing some of the issues. If you delete everything that you dont need that is inherited it should be easier to see what the problem is

        Comment


          #5
          well i had heard that but i was just following geodav's tut, however if i override the default properties of the existing class would the following code be acceptable?

          Code:
          class UTVehicle_Shuggie extends UTVehicle_Manta
          
          defaultproperties
          {
          TeamMaterials(0)=MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Blue'  TeamMaterials(1)=MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Blue'		
          SpawnMaterialLists(0)=(Materials=(MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue'))   SpawnMaterialLists(1)=(Materials=(MaterialInstanceConstant'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue'))  BurnOutMaterial(0)=MaterialInstanceTimeVarying'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue_BO'  BurnOutMaterial(1)=MaterialInstanceTimeVarying'VH_Shuggie_Ship.Materials.MIC_Shuggie_Ship_Spawn_Blue_BO'
          Begin Object Name=SVehicleMesh ObjName=SVehicleMesh Archetype=SkeletalMeshComponent'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship'
                SkeletalMesh=SkeletalMesh'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship'      
                AnimTreeTemplate=AnimTree'VH_Shuggie_Ship.Anims.Shuggie_Ship_AnimTree'      
                PhysicsAsset=PhysicsAsset'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship_Physics'
                MorphSets(0)=MorphTargetSet'VH_Manta.Mesh.VH_Manta_MorphTargets'      
                ObjectArchetype=SkeletalMeshComponent'UTGame.Default__UTVehicle_Manta:SVehicleMesh'
             End Object
             Mesh=SVehicleMesh
          }

          Comment


            #6
            ive recompiled the script with the above code however it still appears with the same "Accessed None 'SeatPawn'

            any ideas?

            Comment


              #7
              Code:
                Seats(0)=(GunClass=Class'UTVWeap_Shuggie_Gun',GunSocket=("Gun_Socket_01","Gun_Socket_02"),WeaponEffects=((SocketName="Gun_Socket_01",Offset=(X=-35.000000,Y=-3.000000,Z=0.000000),Scale3D=(X=3.000000,Y=6.000000,Z=6.000000)),(SocketName="Gun_Socket_02",Offset=(X=-35.000000,Y=-3.000000,Z=0.000000),Scale3D=(X=3.000000,Y=6.000000,Z=6.000000))),TurretControls=("gun_rotate_lt","gun_rotate_rt"),CameraTag="ViewSocket",CameraBaseOffset=(X=-20.000000,Y=0.000000,Z=10.000000),CameraOffset=-180.000000,bSeatVisible=True,SeatOffset=(X=-30.000000,Y=0.000000,Z=-5.000000),DriverDamageMult=0.750000,SeatIconPOS=(X=0.460000,Y=0.450000))
              I'm pretty sure it's complaining it doesn't know what a 'UTVWeap_Shuggie_Gun' is. It's either that or the error is in your UTVWeap_Shuggie_Gun code.

              Also, the default manta code might throw that error

              Comment


                #8
                i believe you are correct, it appears that there are no seats assigned to my vehicle. If i just leave out the reference to UTVWeap_Shuggie_Gun and use the manta weapon UTVWeap_MantaGun, is it possible that this will solve my problem. Im honestly not really sure what im doing wrong at this point.

                if its easier to upload my upk and .ucs id be happy to do that, any help is appreciated

                Comment


                  #9
                  Try the Manta seat and post if that helped.

                  Comment


                    #10
                    Yeah, i seem to have fixed it, and it is working quite well now.

                    Having a few troubles with the physics of the vehicle, but am sorting them out now, if i continue to have trouble i will ask here. Thanks

                    Comment


                      #11
                      okay, well my vehicle is coming along quite nicely, i was wondering if there was a resource that had a list of attributes in the code, for example id like to increase the max speed for my ship, can someone shed some light on what the value i need to change is?

                      Comment


                        #12
                        i have changed maxthrust force, airspeed, groundspeed, crouchedairspeed, and fullairspeed values in my scripts to around 5000 for each, however it doesnt seem to actually have changed anything in my ship, im not quite sure what im doing wrong at this point, any suggestions?

                        Comment


                          #13
                          post your code so people can help you better

                          Comment


                            #14
                            Code:
                            Class MyVehicle extends UTVehicle_Manta;
                            defaultproperties
                            {
                               Begin Object Name=SimObject ObjName=SimObject       Archetype=UTVehicleSimHover'UTGame.Default__UTVehicleSimHover'
                                  MaxThrustForce=5000.000000
                                  MaxReverseForce=250.000000
                                  LongDamping=0.300000
                                  MaxStrafeForce=275.000000
                                  LatDamping=0.300000
                                  DirectionChangeForce=400.000000
                                  TurnTorqueFactor=5000.000000
                                  TurnTorqueMax=1000.000000
                                  TurnDamping=0.250000
                                  MaxYawRate=100000.000000
                                  PitchTorqueFactor=200.000000
                                  PitchTorqueMax=18.000000
                                  PitchDamping=0.100000
                                  RollTorqueTurnFactor=1000.000000
                                  RollTorqueStrafeFactor=110.000000
                                  RollTorqueMax=500.000000
                                  RollDamping=0.200000
                                  MaxRandForce=20.000000
                                  RandForceInterval=0.400000
                                  bAllowZThrust=True
                                  WheelSuspensionStiffness=20.000000
                                  WheelSuspensionDamping=1.000000
                                  Name="SimObject"
                                  ObjectArchetype=UTVehicleSimHover'UTGame.Default__UTVehicleSimHover'
                               End Object
                               AirSpeed=5000
                               GroundSpeed=5000
                               CrouchedAirSpeed=5000
                               FullAirSpeed=5000
                            }
                            Code:
                            class MyVehicle_Content extends MyVehicle;
                            
                            defaultproperties
                            {
                               Begin Object Name=SVehicleMesh
                                  SkeletalMesh=SkeletalMesh'VH_Shuggie_Ship.Mesh.SK_Shuggie_Ship'
                                  AnimTreeTemplate=AnimTree'VH_Shuggie_Ship.Anims.Shuggie_Ship_AnimTree'
                                  PhysicsAsset=PhysicsAsset'VH_Manta.Mesh.SK_VH_Manta_Physics'
                               End Object
                               
                               Seats(0)={(GunClass=class'UTVWeap_MantaGun', GunSocket=(GunnerFireSocket), TurretControls=(GunnerConstraint,GunnerConstraintYaw), GunPivotPoints=(SecondaryTurretYaw), CameraTag=DriverViewSocket,CameraOffset=-300, CameraBaseOffset=(X=-50.0,Z=20.0), SeatIconPos=(X=0.44,Y=0.48), DriverDamageMult=0.0, MuzzleFlashLightClass=class'UTGame.UTShockMuzzleFlashLight', WeaponEffects=((SocketName=GunnerFireSocket,Offset=(X=-35),Scale3D=(X=4.0,Y=6.5,Z=6.5)))
                            	)}
                            }
                            thanks again

                            Comment

                            Working...
                            X