AlhimN1
Местный житель
код корабля в ла2
код Shuttle из классик
из кода вижу что сменили тип движителя с транспорта на пешку(нпц) и ещё они его прописали в енджие а не отдельно как транспорт
пробую тоже подставить такую шляпу
сам скрипт как бы и билдится в интерлюде
пробую заспавнить как нпц, но получается заяц. т.е. статик меш не спавнится...
так ну ладно, уже заспавнился
поменял везде колизию и на сервере и в скрипте, всё равно персонаж проваливается сквозь него
но через других мобов не проходит
//================================================================================
// PassengerShip.
//================================================================================
class PassengerShip extends Vehicle
Config(User);
var float maxPitch;
var float MaxRoll;
var float MaxDelta;
var bool bIncreasePitch;
var bool bIncreaseRoll;
var float AccumulatePitch;
var float AccumulateRoll;
var float fTotalWaveTime;
var float fMaxHeight;
var float fElapsedTime;
var float fCoef;
var float fOldHeight;
var Sound WaveLargeSound;
var Sound WaveSmallSound;
var Sound SailSound;
var Sound CreakSoundLarge;
var Sound CreakSoundSmall;
var float fSoundNotifyTotalTime;
var float fSoundNotifyTime;
simulated function PostBeginPlay ()
{
fMaxHeight = 4.0; // 0x00000013 : 0x0000
fTotalWaveTime = 6000.0; // 0x0000001B : 0x000B
fCoef = fTotalWaveTime / 2 * Pi; // 0x00000023 : 0x0016
fSoundNotifyTotalTime = 1500.0; // 0x00000035 : 0x002E
WaveLargeSound = Sound(DynamicLoadObject("AmbSound.ship_wave_large",Class'Sound')); // 0x0000003D : 0x0039
WaveSmallSound = Sound(DynamicLoadObject("AmbSound.ship_wave_small",Class'Sound')); // 0x00000061 : 0x0069
SailSound = Sound(DynamicLoadObject("AmbSound.ship_sail",Class'Sound')); // 0x00000085 : 0x0099
CreakSoundLarge = Sound(DynamicLoadObject("AmbSound.ship_creak_large",Class'Sound')); // 0x000000A3 : 0x00C3
CreakSoundSmall = Sound(DynamicLoadObject("AmbSound.ship_creak_small",Class'Sound')); // 0x000000C8 : 0x00F4
}
simulated function Tick (float DeltaTime)
{
local int DeltaYaw;
local Vector NewLocation;
local Rotator NewRotation;
local Vector Direction;
local float fHeight;
NewLocation = Location; // 0x00000013 : 0x0000
if ( bTrip ) // 0x00000018 : 0x000B
{
if ( TripTarget != Location ) // 0x0000001E : 0x0014
{
NewRotation = Vector2Rotator(TripTarget - Location); // 0x00000027 : 0x0023
NewRotation.Pitch = Rotation.Pitch; // 0x00000033 : 0x003B
NewRotation.Roll = Rotation.Roll; // 0x0000003C : 0x0050
NewRotation.Yaw += 16384; // 0x00000045 : 0x0065
DeltaYaw = NewRotation.Yaw - Rotation.Yaw; // 0x00000050 : 0x0076
if ( DeltaYaw > 32768 ) // 0x0000005D : 0x0092
{
DeltaYaw -= 65536; // 0x00000069 : 0x00A1
goto JL0092; // 0x00000072 : 0x00AD
}
if ( DeltaYaw < -32767 ) // 0x00000075 : 0x00B0
{
DeltaYaw += 65536; // 0x00000081 : 0x00BF
goto JL00B0; // 0x0000008A : 0x00CB
}
if ( DeltaYaw > int(RotationSpeed * DeltaTime) ) // 0x0000008D : 0x00CE
{
NewRotation.Yaw = Rotation.Yaw + int(RotationSpeed * DeltaTime); // 0x0000009E : 0x00E8
} else { // 0x000000B3 : 0x010F
if ( DeltaYaw < -int(RotationSpeed * DeltaTime) ) // 0x000000B6 : 0x0112
{
NewRotation.Yaw = Rotation.Yaw - int(RotationSpeed * DeltaTime); // 0x000000C9 : 0x012E
}
}
if ( NewRotation.Yaw != Rotation.Yaw ) // 0x000000DE : 0x0155
{
SetRotation(NewRotation); // 0x000000EB : 0x016E
}
if ( VSize(TripTarget - Location) < MoveSpeed * DeltaTime ) // 0x000000F0 : 0x0176
{
TripTarget.Z = Location.Z; // 0x00000103 : 0x0195
SetLocation(TripTarget); // 0x0000010C : 0x01AA
bTrip = False; // 0x00000111 : 0x01B2
} else { // 0x00000116 : 0x01BA
Direction = vect(0.00,-1.00,0.00) >> Rotation; // 0x00000119 : 0x01BD
NewLocation += Direction * MoveSpeed * DeltaTime; // 0x0000012E : 0x01D8
NewLocation.Z = Location.Z; // 0x0000013C : 0x01F2
SetLocation(NewLocation); // 0x00000145 : 0x0207
}
}
} else { // 0x0000014A : 0x020F
fElapsedTime += DeltaTime * 1000.0; // 0x0000014D : 0x0212
if ( fElapsedTime > fTotalWaveTime ) // 0x0000015A : 0x0225
{
fElapsedTime = fElapsedTime - fTotalWaveTime; // 0x00000163 : 0x0234
}
fHeight = fMaxHeight * Sin(fElapsedTime / fCoef); // 0x0000016C : 0x0246
NewLocation = Location; // 0x0000017B : 0x0261
NewLocation.Z = NewLocation.Z + fHeight - fOldHeight; // 0x00000180 : 0x026C
fOldHeight = fHeight; // 0x00000191 : 0x028F
SetLocation(NewLocation); // 0x00000196 : 0x029A
}
Super.Tick(DeltaTime); // 0x0000019B : 0x02A2
}
defaultproperties
{
maxPitch=91.00
MaxRoll=91.00
MaxDelta=300.00
bIncreasePitch=True
bIncreaseRoll=True
StaticVehicleMast=StaticMesh'L2_ship_L01_S.L2_ship_L01_mast'
bCanBeBaseForPawns=True
DrawType=8
StaticMesh=StaticMesh'L2_ship_L01_S.L2_ship_L01_base'
L2NeedTick=False
SoundVolume=228
CollisionRadius=0.00
CollisionHeight=0.00
}
// PassengerShip.
//================================================================================
class PassengerShip extends Vehicle
Config(User);
var float maxPitch;
var float MaxRoll;
var float MaxDelta;
var bool bIncreasePitch;
var bool bIncreaseRoll;
var float AccumulatePitch;
var float AccumulateRoll;
var float fTotalWaveTime;
var float fMaxHeight;
var float fElapsedTime;
var float fCoef;
var float fOldHeight;
var Sound WaveLargeSound;
var Sound WaveSmallSound;
var Sound SailSound;
var Sound CreakSoundLarge;
var Sound CreakSoundSmall;
var float fSoundNotifyTotalTime;
var float fSoundNotifyTime;
simulated function PostBeginPlay ()
{
fMaxHeight = 4.0; // 0x00000013 : 0x0000
fTotalWaveTime = 6000.0; // 0x0000001B : 0x000B
fCoef = fTotalWaveTime / 2 * Pi; // 0x00000023 : 0x0016
fSoundNotifyTotalTime = 1500.0; // 0x00000035 : 0x002E
WaveLargeSound = Sound(DynamicLoadObject("AmbSound.ship_wave_large",Class'Sound')); // 0x0000003D : 0x0039
WaveSmallSound = Sound(DynamicLoadObject("AmbSound.ship_wave_small",Class'Sound')); // 0x00000061 : 0x0069
SailSound = Sound(DynamicLoadObject("AmbSound.ship_sail",Class'Sound')); // 0x00000085 : 0x0099
CreakSoundLarge = Sound(DynamicLoadObject("AmbSound.ship_creak_large",Class'Sound')); // 0x000000A3 : 0x00C3
CreakSoundSmall = Sound(DynamicLoadObject("AmbSound.ship_creak_small",Class'Sound')); // 0x000000C8 : 0x00F4
}
simulated function Tick (float DeltaTime)
{
local int DeltaYaw;
local Vector NewLocation;
local Rotator NewRotation;
local Vector Direction;
local float fHeight;
NewLocation = Location; // 0x00000013 : 0x0000
if ( bTrip ) // 0x00000018 : 0x000B
{
if ( TripTarget != Location ) // 0x0000001E : 0x0014
{
NewRotation = Vector2Rotator(TripTarget - Location); // 0x00000027 : 0x0023
NewRotation.Pitch = Rotation.Pitch; // 0x00000033 : 0x003B
NewRotation.Roll = Rotation.Roll; // 0x0000003C : 0x0050
NewRotation.Yaw += 16384; // 0x00000045 : 0x0065
DeltaYaw = NewRotation.Yaw - Rotation.Yaw; // 0x00000050 : 0x0076
if ( DeltaYaw > 32768 ) // 0x0000005D : 0x0092
{
DeltaYaw -= 65536; // 0x00000069 : 0x00A1
goto JL0092; // 0x00000072 : 0x00AD
}
if ( DeltaYaw < -32767 ) // 0x00000075 : 0x00B0
{
DeltaYaw += 65536; // 0x00000081 : 0x00BF
goto JL00B0; // 0x0000008A : 0x00CB
}
if ( DeltaYaw > int(RotationSpeed * DeltaTime) ) // 0x0000008D : 0x00CE
{
NewRotation.Yaw = Rotation.Yaw + int(RotationSpeed * DeltaTime); // 0x0000009E : 0x00E8
} else { // 0x000000B3 : 0x010F
if ( DeltaYaw < -int(RotationSpeed * DeltaTime) ) // 0x000000B6 : 0x0112
{
NewRotation.Yaw = Rotation.Yaw - int(RotationSpeed * DeltaTime); // 0x000000C9 : 0x012E
}
}
if ( NewRotation.Yaw != Rotation.Yaw ) // 0x000000DE : 0x0155
{
SetRotation(NewRotation); // 0x000000EB : 0x016E
}
if ( VSize(TripTarget - Location) < MoveSpeed * DeltaTime ) // 0x000000F0 : 0x0176
{
TripTarget.Z = Location.Z; // 0x00000103 : 0x0195
SetLocation(TripTarget); // 0x0000010C : 0x01AA
bTrip = False; // 0x00000111 : 0x01B2
} else { // 0x00000116 : 0x01BA
Direction = vect(0.00,-1.00,0.00) >> Rotation; // 0x00000119 : 0x01BD
NewLocation += Direction * MoveSpeed * DeltaTime; // 0x0000012E : 0x01D8
NewLocation.Z = Location.Z; // 0x0000013C : 0x01F2
SetLocation(NewLocation); // 0x00000145 : 0x0207
}
}
} else { // 0x0000014A : 0x020F
fElapsedTime += DeltaTime * 1000.0; // 0x0000014D : 0x0212
if ( fElapsedTime > fTotalWaveTime ) // 0x0000015A : 0x0225
{
fElapsedTime = fElapsedTime - fTotalWaveTime; // 0x00000163 : 0x0234
}
fHeight = fMaxHeight * Sin(fElapsedTime / fCoef); // 0x0000016C : 0x0246
NewLocation = Location; // 0x0000017B : 0x0261
NewLocation.Z = NewLocation.Z + fHeight - fOldHeight; // 0x00000180 : 0x026C
fOldHeight = fHeight; // 0x00000191 : 0x028F
SetLocation(NewLocation); // 0x00000196 : 0x029A
}
Super.Tick(DeltaTime); // 0x0000019B : 0x02A2
}
defaultproperties
{
maxPitch=91.00
MaxRoll=91.00
MaxDelta=300.00
bIncreasePitch=True
bIncreaseRoll=True
StaticVehicleMast=StaticMesh'L2_ship_L01_S.L2_ship_L01_mast'
bCanBeBaseForPawns=True
DrawType=8
StaticMesh=StaticMesh'L2_ship_L01_S.L2_ship_L01_base'
L2NeedTick=False
SoundVolume=228
CollisionRadius=0.00
CollisionHeight=0.00
}
код Shuttle из классик
Код:
//================================================================================
// Shuttle.
//================================================================================
class Shuttle extends Pawn
Native
NoNativeReplication
Config(User);
var bool bStart;
var() array<ShuttleWall> WallList;
var() array<ShuttleDoor> DoorList;
var() array<string> DoorMeshNameList;
var AmbientSoundObject ShuttleAmbientSound;
var int ShuttleSoundVol;
var int ShuttleSoundVolWhenStop;
var int ShuttleSoundRadii;
var Sound ShuttleStartSound;
var Sound ShuttleStopSound;
event OnClose ()
{
local int doornum;
local int dooridx;
doornum = DoorList.Length; // 0x00000016 : 0x0000
dooridx = 0; // 0x0000001E : 0x000C
if ( dooridx < doornum ) // 0x00000023 : 0x0013
{
DoorList[dooridx].Close(); // 0x0000002E : 0x0022
dooridx++; // 0x0000003D : 0x0037
goto JL0013; // 0x00000042 : 0x003E
}
}
event OnOpen ()
{
local int doornum;
local int dooridx;
doornum = DoorList.Length; // 0x00000016 : 0x0000
dooridx = 0; // 0x0000001E : 0x000C
if ( dooridx < doornum ) // 0x00000023 : 0x0013
{
DoorList[dooridx].Open(); // 0x0000002E : 0x0022
dooridx++; // 0x0000003D : 0x0037
goto JL0013; // 0x00000042 : 0x003E
}
}
defaultproperties
{
bAsTreatWorld=True
bCanBeBaseForPawns=True
Physics=4
DrawType=8
bIgnoreEncroachers=True
bReadyToRender=True
CollisionRadius=0.00
CollisionHeight=0.00
bCollideWorld=False
}
из кода вижу что сменили тип движителя с транспорта на пешку(нпц) и ещё они его прописали в енджие а не отдельно как транспорт
пробую тоже подставить такую шляпу
Код:
class CrumaLift extends Pawn
Config(User);
#exec OBJ LOAD FILE="Dion_Cruma_Tower_S.usx"
//#exec OBJ LOAD FILE=..\Sounds\AmbSound.uax PACKAGE=AmbSound
var bool bTrip;
var vector TripTarget;
var float MoveSpeed;
var float RotationSpeed;
var float maxPitch;
var float MaxRoll;
var float MaxDelta;
var bool bIncreasePitch;
var bool bIncreaseRoll;
var float AccumulatePitch;
var float AccumulateRoll;
var float fTotalWaveTime;
var float fMaxHeight;
var float fElapsedTime;
var float fCoef;
var float fOldHeight;
var Sound WaveLargeSound;
var Sound WaveSmallSound;
var Sound SailSound;
var Sound CreakSoundLarge;
var Sound CreakSoundSmall;
var float fSoundNotifyTotalTime;
var float fSoundNotifyTime;
var float fHeight;
var StaticMeshActor LiftMesh;
simulated function PostBeginPlay ()
{
fMaxHeight = 4.0; // 0x00000013 : 0x0000
fTotalWaveTime = 6000.0; // 0x0000001B : 0x000B
fCoef = fTotalWaveTime / 2 * Pi; // 0x00000023 : 0x0016
fSoundNotifyTotalTime = 1500.0; // 0x00000035 : 0x002E
// WaveLargeSound = Sound(DynamicLoadObject("AmbSound.ship_wave_large",Class'Sound')); // 0x0000003D : 0x0039
//WaveSmallSound = Sound(DynamicLoadObject("AmbSound.ship_wave_small",Class'Sound')); // 0x00000061 : 0x0069
//SailSound = Sound(DynamicLoadObject("AmbSound.ship_sail",Class'Sound')); // 0x00000085 : 0x0099
//CreakSoundLarge = Sound(DynamicLoadObject("AmbSound.ship_creak_large",Class'Sound')); // 0x000000A3 : 0x00C3
//CreakSoundSmall = Sound(DynamicLoadObject("AmbSound.ship_creak_small",Class'Sound')); // 0x000000C8 : 0x00F4
LiftMesh = Spawn(class'StaticMeshActor', self);
if (LiftMesh != None)
{
LiftMesh.SetStaticMesh(StaticMesh'Dion_Cruma_Tower_S.Cruma_Elevator');
LiftMesh.SetLocation(Location); // поставить туда же, где CrumaLift
LiftMesh.SetRotation(Rotation); // выровнять по повороту
LiftMesh.SetDrawType(DT_StaticMesh);
//LiftMesh.SetCollision(false, false, false); // убрать коллизии если не нужны
}
}
simulated function Tick(Float DeltaTime)
{
local int DeltaYaw;
local vector NewLocation;
local rotator NewRotation;
local vector Direction;
NewLocation = Location;
if( bTrip )
{
if ( TripTarget != Location )
{
NewRotation = Vector2Rotator( TripTarget - Location );
NewRotation.Pitch = Rotation.Pitch;
NewRotation.Roll = Rotation.Roll;
NewRotation.Yaw += 16384;
DeltaYaw = NewRotation.Yaw - Rotation.Yaw;
while( DeltaYaw > 32768 ) DeltaYaw -= 65536;
while( DeltaYaw < -32767 ) DeltaYaw += 65536;
if( DeltaYaw > int(RotationSpeed * DeltaTime) )
NewRotation.Yaw = Rotation.Yaw + int(RotationSpeed * DeltaTime);
else if( DeltaYaw < -int(RotationSpeed * DeltaTime) )
NewRotation.Yaw = Rotation.Yaw - int(RotationSpeed * DeltaTime);
if( VSize( TripTarget - Location ) < MoveSpeed * DeltaTime )
{
TripTarget.Z = Location.Z;
SetLocation( TripTarget );
bTrip = false;
}
else
{
Direction = vect(0,-1,0) >> Rotation;
NewLocation += Direction * MoveSpeed * DeltaTime;
NewLocation.Z = Location.Z;
SetLocation( NewLocation );
}
}
}
else
{
fElapsedTime += DeltaTime*1000.f; // convert to millisecond
if ( fElapsedTime > fTotalWaveTime )
{
fElapsedTime = fElapsedTime - fTotalWaveTime;
}
fHeight = fMaxHeight * Sin(fElapsedTime/fCoef);
NewLocation = Location;
NewLocation.Z = NewLocation.Z + (fHeight - fOldHeight);
fOldHeight = fHeight;
SetLocation( NewLocation );
}
Super.Tick(DeltaTime); // 0x0000019B : 0x02A2
}
defaultproperties
{
maxPitch=8.00
MaxRoll=8.00
MaxDelta=300.00
bIncreasePitch=True
bIncreaseRoll=True
bCanBeBaseForPawns=True
DrawType=DT_StaticMesh
StaticMesh=StaticMesh'Dion_Cruma_Tower_S.Cruma_Elevator'
L2NeedTick=False
CollisionRadius=0.00
CollisionHeight=0.00
}
сам скрипт как бы и билдится в интерлюдепробую заспавнить как нпц, но получается заяц. т.е. статик меш не спавнится...
так ну ладно, уже заспавнился
поменял везде колизию и на сервере и в скрипте, всё равно персонаж проваливается сквозь него
но через других мобов не проходит
Последнее редактирование: