Ir para conteúdo
Fórum Script Brasil

Gustavo6046

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Gustavo6046

Gustavo6046's Achievements

0

Reputação

  1. Olá a todos!! :D Estou fazendo um veículo para UnrealScript da Unreal Engine 1 (mais especificamente, Unreal Tournament v436) que FUNCIONE. Porém o seguinte erro surge: Error in UT99Vehicle, line 155: 'state': expecting State, got Function Esse é o código inteiro: //============================================================================= // UT99Vehicle. //============================================================================= class UT99Vehicle expands Pickup; var(Vehicle) Vector DriverOffset; var(Vehicle) Vector PassengerOffsets[63]; var(Vehicle) float TopSpeed; var(Vehicle) float VehicleHealth; var byte PeopleInside; var Pawn PassengerPawns[63]; var Pawn DriverPawn; var(Vehicle) bool bTeamGame; var(Vehicle) float ActorBumpForce; var(Vehicle) int MyTeam; var(Vehicle) bool bSetTeamToDriverTeam; var(Vehicle) int PawnBumpDamage; var(Vehicle) float Weight; var(Vehicle) string KillMessage[3]; var(Vehicle) int MaxPassengers; var(Vehicle) float RespawnTime; var(Vehicle) Texture DestroyedTexture; var Texture OldTexture; simulated function TakeDamage(int Health, Pawn EventInstigator, vector HitLocation, vector Momentum, name DamageType) { if ( DamageType != 'AntiVehicle' ) self.Velocity += Momentum / (Weight / 2); else self.Velocity += Momentum / Weight; } simulated function Touch(Actor Other) { if ( Other.IsA(class'Pawn'.Name) && PeopleInside > 1 ) { if ( ( Level.Game.IsA(class'TeamGamePlus'.Name) && ( ( !bSetTeamToDriverTeam && Pawn(Other).PlayerReplicationInfo.Team == MyTeam ) ^^ ( bSetTeamToDriverTeam && Pawn(Other).PlayerReplicationInfo.Team == DriverPawn.PlayerReplicationInfo.Team ) ) ) && Pawn(Other).PlayerReplicationInfo.Team != 255 && PeopleInside <= MaxPassengers ) { PassengerPawns[PeopleInside - 1] = Pawn(Other); PeopleInside++; } else { Other.TakeDamage(PawnBumpDamage, DriverPawn, Location, Velocity, 'vehiclebump'); Other.Velocity = (Other.Location - Location) * ActorBumpForce; if ( Pawn(Other).Health < 1 ) { Pawn(Other).GoToState('Dying'); BroadcastMessage(KillMessage[0] @ DriverPawn.Name @ KillMessage[1] @ Pawn(Other).Name @ KillMessage[2]); } } } else if ( Other.IsA(class'Projectile'.Name) ) { Projectile(Other).ProcessTouch(self, self.Location); } else if ( Other.bBlockActors ) Other.Velocity = (Other.Location - Location) * ActorBumpForce; } simulated function AdjustMotion(vector OldLocation, pawn Driver) { if ( VSize(OldLocation - Location) > TopSpeed ) { return Normal(OldLocation - Location) * TopSpeed; } } simulated function LeaveVehicle(byte Index) { local int i; if ( Index == 0 ) { DriverPawn == None; PeopleInside--; for (i = 0; i < 64; i++) if ( PassengerPawns[i] != None ) PassengerPawns[i] == None; } elif ( Index < 64 ) { for ( i = Index--; i < 63; i++ ) { if ( PassengerPawns[i++] != None ) PassengerPawns[i] = PassengerPawns[i++]; else return; } } } function PickupFunction(Pawn Other) { if ( IsInState('Destroyed') || IsInState('Activated') ) return; DriverPawn = Other; PeopleInside++; GoToState('Activated'); } simulated function Tick(float TimeDelta) { local vector OldLocation; local int i; if ( PeopleInside < 1 || !IsInState('Activated') ) return; if ( VehicleHealth < 1 ) { Spawn(class'ExplosionChain', self, Location + (BlastOffset * (VRand() * 2 ))).Trigger(self, DriverPawn); GoToState('Destroyed') } OldLocation = Location; if ( DriverPawn != None ) { Self.Location = DriverPawn.Location - DriverOffset; } Move(AdjustMotion(OldLocation, DriverPawn)) DriverPawn.SetLocation(Location + DriverOffset); for ( i = 0; i < 64; i++ ) if ( PassengerPawns[i] != None ) { PassengerPawns[í].SetLocation(Location + PassengerOffsets[i]); } } State() Destroyed { function TakeDamage(); function Tick(); function LeaveVehicle(); function PickupFunction(); function Touch(); simulated function BeginState() { OldTexture = Texture; Texture = DestroyedTexture; Super.Sleep(RespawnTime); Texture = OldTexture GoToState(InitialState); } } EDIT: Nossa, o resto do texto foi trincado :/ EDIT2:Tentei procurar por algo na Unreal Wiki, mas tudo que encontrei era a sintaxe de declaração (que já estava correta) e uma "solução" que não funcionou. E uma pesquisa Google pelos termos exatos: unrealscript "expecting state got function" EDIT3: Para de trincar meu texto DX
×
×
  • Criar Novo...