diff --git a/P3D/Content/Data/Scripts/violet/teacher.dat b/P3D/Content/Data/Scripts/violet/teacher.dat index 474a4e60c..d44c19931 100644 Binary files a/P3D/Content/Data/Scripts/violet/teacher.dat and b/P3D/Content/Data/Scripts/violet/teacher.dat differ diff --git a/P3D/Overworld/OverworldCamera.vb b/P3D/Overworld/OverworldCamera.vb index b5b8162de..af1c2a7e1 100644 --- a/P3D/Overworld/OverworldCamera.vb +++ b/P3D/Overworld/OverworldCamera.vb @@ -25,7 +25,7 @@ Public Class OverworldCamera Private _scrollSpeed As Single = 0F Private _scrollDirection As Integer = 1 - Private _moved As Single = 0F + Public _moved As Single = 0F Public LastStepPosition As Vector3 = New Vector3(0, -2, 0) Public YawLocked As Boolean = False diff --git a/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb b/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb index 41530d209..cc916ad18 100644 --- a/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb +++ b/P3D/World/ActionScript/V2/ScriptConstructs/DoPlayer.vb @@ -47,7 +47,11 @@ Case "skin" Return Core.Player.Skin Case "velocity" - Return 0F + Return CInt(CType(Screen.Camera, OverworldCamera)._moved) + Case "speed" + Return Screen.Camera.Speed / 0.04F + Case "isrunning" + Return ReturnBoolean(Core.Player.IsRunning) Case "ismoving" Return ReturnBoolean(Screen.Camera.IsMoving()) Case "facing" diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index b7b986319..6d6b41f7e 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -489,7 +489,9 @@ Namespace ScriptVersion2 r(New ScriptCommand("player", "hasbadge", "bool", {New ScriptArgument("badgeID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns if the player owns a specific Badge.", ",", True)) r(New ScriptCommand("player", "skin", "str", "Returns the current skin the player wears.", ",", True)) r(New ScriptCommand("player", "velocity", "sng", "Returns the player's velocity (steps until the player movement ends).", ",", True)) - r(New ScriptCommand("player", "ismoving", "bool", "Returns if the player moves.", ",", True)) + r(New ScriptCommand("player", "speed", "sng", "Returns the player's movement speed (divided by 0.04F).", ",", True)) + r(New ScriptCommand("player", "isrunning", "bool", "Returns if the player is currently running.", ",", True)) + r(New ScriptCommand("player", "ismoving", "bool", "Returns if the player is currently moving.", ",", True)) r(New ScriptCommand("player", "facing", "int", "Returns the direction the player is facing.", ",", True)) r(New ScriptCommand("player", "compass", "str", "Returns ""north"", ""east"", ""south"" or ""east"" depending on the direction the player is facing.", ",", True)) r(New ScriptCommand("player", "money", "int", "Returns the player's money.", ",", True))