Added PreventMovement property and commands

"@player.preventmovement" Makes the player unable to move, while still keeping control over the menu, interactions etc.
"@player.allowmovement" Gives the player back their ability to move.
This commit is contained in:
JappaWakka 2022-09-29 21:27:44 +02:00
parent d4d53ba0ea
commit 653fc249d1
2 changed files with 10 additions and 1 deletions

View File

@ -26,6 +26,7 @@ Public Class OverworldCamera
Private _scrollSpeed As Single = 0F
Private _scrollDirection As Integer = 1
Public _moved As Single = 0F
Public PreventMovement As Boolean = False
Public LastStepPosition As Vector3 = New Vector3(0, -2, 0)
Public YawLocked As Boolean = False
@ -634,7 +635,7 @@ Public Class OverworldCamera
isActionscriptReady = OS.ActionScript.IsReady
End If
If isActionscriptReady = True AndAlso ScriptBlock.TriggeredScriptBlock = False And Screen.Level.CanMove() = True Then
If isActionscriptReady = True AndAlso ScriptBlock.TriggeredScriptBlock = False AndAlso Screen.Level.CanMove() = True AndAlso PreventMovement = False Then
If _thirdPerson = False And _cameraFocusType = CameraFocusTypes.Player Then
FirstPersonMovement()
Else

View File

@ -203,6 +203,14 @@
Case "stopmovement"
Screen.Camera.StopMovement()
IsReady = True
Case "preventmovement"
CType(Screen.Camera, OverworldCamera).PreventMovement = True
IsReady = True
Case "allowmovement"
CType(Screen.Camera, OverworldCamera).PreventMovement = False
IsReady = True
Case "money", "addmoney"
Core.Player.Money += int(argument)