Fixed slideblock and waterfall
This commit is contained in:
parent
10a2faa62c
commit
300aa87738
|
@ -5,6 +5,7 @@
|
|||
Dim TempScriptEntity As ScriptBlock = Nothing
|
||||
|
||||
Public Overrides Function WalkAgainstFunction() As Boolean
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = True
|
||||
Dim facing As Integer = CInt(Me.Rotation.Y / MathHelper.PiOver2)
|
||||
facing -= 2
|
||||
If facing < 0 Then
|
||||
|
@ -59,7 +60,8 @@
|
|||
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",0," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
||||
"@overworldpokemon.hide" & Environment.NewLine &
|
||||
"@player.move(1)" & Environment.NewLine &
|
||||
"@overworldpokemon.hide" & Environment.NewLine
|
||||
"@overworldpokemon.hide" & Environment.NewLine &
|
||||
"@player.allowmovement" & Environment.NewLine
|
||||
|
||||
If Not Me.TempScriptEntity Is Nothing Then
|
||||
s &= GetScriptStartLine(Me.TempScriptEntity) & Environment.NewLine
|
||||
|
@ -71,6 +73,7 @@
|
|||
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
|
||||
Return True
|
||||
Else
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
Return True
|
||||
End If
|
||||
|
||||
|
@ -79,9 +82,11 @@
|
|||
facing += 4
|
||||
End If
|
||||
If Screen.Camera.GetPlayerFacingDirection() = facing Then
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
Return False
|
||||
End If
|
||||
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
Return True
|
||||
End Function
|
||||
|
||||
|
@ -103,6 +108,7 @@
|
|||
End Function
|
||||
|
||||
Public Overrides Sub WalkOntoFunction()
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = True
|
||||
Dim facing As Integer = CInt(Me.Rotation.Y / MathHelper.PiOver2)
|
||||
|
||||
Screen.Camera.PlannedMovement = Vector3.Zero
|
||||
|
@ -152,7 +158,8 @@
|
|||
"@player.move(1)" & Environment.NewLine &
|
||||
"@player.setmovement(" & Screen.Camera.GetMoveDirection().X & ",-1," & Screen.Camera.GetMoveDirection().Z & ")" & Environment.NewLine &
|
||||
"@player.move(" & Steps & ")" & Environment.NewLine &
|
||||
"@overworldpokemon.hide" & Environment.NewLine
|
||||
"@overworldpokemon.hide" & Environment.NewLine &
|
||||
"@player.allowmovement" & Environment.NewLine
|
||||
|
||||
If Not Me.TempScriptEntity Is Nothing Then
|
||||
s &= GetScriptStartLine(Me.TempScriptEntity) & Environment.NewLine
|
||||
|
@ -162,6 +169,8 @@
|
|||
s &= ":end"
|
||||
|
||||
CType(Core.CurrentScreen, OverworldScreen).ActionScript.StartScript(s, 2, False)
|
||||
Else
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@
|
|||
If Me.ActionValue = 1 Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = True
|
||||
Dim isOnTop As Boolean = True
|
||||
Dim OnTopcheckPosition As Vector3 = New Vector3(Me.Position.X, Me.Position.Y + 1, Me.Position.Z)
|
||||
Dim Oe As Entity = GetEntity(Screen.Level.Entities, OnTopcheckPosition, True, {GetType(Waterfall)})
|
||||
|
@ -234,7 +234,6 @@
|
|||
End While
|
||||
|
||||
s = "version=2" & Environment.NewLine &
|
||||
"@player.preventmovement" & Environment.NewLine &
|
||||
"@player.stopmovement" & Environment.NewLine &
|
||||
"@player.move(2)" & Environment.NewLine &
|
||||
"@player.setmovement(0,-1,0)" & Environment.NewLine &
|
||||
|
@ -254,6 +253,7 @@
|
|||
|
||||
Dim p As Pokemon = ReturnWaterFallPokemonName()
|
||||
If Badge.CanUseHMMove(Badge.HMMoves.Waterfall) = True And Not p Is Nothing Or GameController.IS_DEBUG_ACTIVE = True Or Core.Player.SandBoxMode = True Then
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = True
|
||||
Dim s As String = ""
|
||||
|
||||
Dim pName As String = ""
|
||||
|
@ -284,7 +284,6 @@
|
|||
End If
|
||||
End While
|
||||
s = "version=2" & Environment.NewLine &
|
||||
"@player.preventmovement" & Environment.NewLine &
|
||||
"@player.stopmovement" & Environment.NewLine &
|
||||
"@pokemon.cry(" & pNumber & ")" & Environment.NewLine &
|
||||
"@sound.play(select)" & Environment.NewLine &
|
||||
|
|
|
@ -3,6 +3,7 @@ Public Class ActionScript
|
|||
|
||||
Public Scripts As New List(Of Script)
|
||||
|
||||
Public AllowMovementAfterEnd As Boolean = False
|
||||
Public Class ScriptLevel
|
||||
Public WaitingEndWhen As New List(Of Boolean)
|
||||
Public Switched As New List(Of Boolean)
|
||||
|
@ -79,6 +80,10 @@ nextScript:
|
|||
reDelay = 0.0F
|
||||
End If
|
||||
End If
|
||||
If AllowMovementAfterEnd = True Then
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
AllowMovementAfterEnd = False
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
|
|
@ -228,7 +228,7 @@
|
|||
|
||||
IsReady = True
|
||||
Case "allowmovement"
|
||||
CType(Screen.Camera, OverworldCamera).PreventMovement = False
|
||||
CType(CurrentScreen, OverworldScreen).ActionScript.AllowMovementAfterEnd = True
|
||||
|
||||
IsReady = True
|
||||
Case "money", "addmoney"
|
||||
|
|
Loading…
Reference in New Issue