Added @Level.SetRideType(int) command

Sets the Ride Type of the current map.
Possible values for "int": 0 = Depends on CanDig and CanFly tags, 1 = Can ride, 2 = Can not ride, 3 = Can't stop riding once started
This commit is contained in:
JappaWakka 2023-12-27 18:55:48 +01:00
parent 3f1b7ffc0c
commit 85bcb52780
2 changed files with 4 additions and 0 deletions

View File

@ -69,6 +69,9 @@
Case "setsafari" Case "setsafari"
Screen.Level.IsSafariZone = CBool(argument) Screen.Level.IsSafariZone = CBool(argument)
IsReady = True IsReady = True
Case "setridetype"
Screen.Level.RideType = CInt(argument).Clamp(0, 3)
IsReady = True
End Select End Select
End Sub End Sub

View File

@ -211,6 +211,7 @@ Namespace ScriptVersion2
r(New ScriptCommand("level", "waitforsave", "Makes the level idle until the current saving of an GameJolt save is done.")) r(New ScriptCommand("level", "waitforsave", "Makes the level idle until the current saving of an GameJolt save is done."))
r(New ScriptCommand("level", "reload", "Reloads the current map.")) r(New ScriptCommand("level", "reload", "Reloads the current map."))
r(New ScriptCommand("level", "setsafari", {New ScriptArgument("safari", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets if the current map is a Safari Zone (influences battle style).")) r(New ScriptCommand("level", "setsafari", {New ScriptArgument("safari", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets if the current map is a Safari Zone (influences battle style)."))
r(New ScriptCommand("level", "setridetype", {New ScriptArgument("rideType", ScriptArgument.ArgumentTypes.Int, {"0-3"})}.ToList(), "Sets the Ride Type of the current map. (0 = Depends on CanDig and CanFly tags, 1 = Can ride, 2 = Can not ride, 3 = Can't stop riding once started)"))
' Constructs: ' Constructs:
r(New ScriptCommand("level", "mapfile", "str", "Returns the mapfile of the currently loaded map.", ",", True)) r(New ScriptCommand("level", "mapfile", "str", "Returns the mapfile of the currently loaded map.", ",", True))
r(New ScriptCommand("level", "levelfile", "str", "Returns the mapfile of the currently loaded map.", ",", True)) r(New ScriptCommand("level", "levelfile", "str", "Returns the mapfile of the currently loaded map.", ",", True))