diff --git a/P3D/World/ActionScript/V2/ScriptCommands/DoEntity.vb b/P3D/World/ActionScript/V2/ScriptCommands/DoEntity.vb index aeca6333c..ac1d7dd77 100644 --- a/P3D/World/ActionScript/V2/ScriptCommands/DoEntity.vb +++ b/P3D/World/ActionScript/V2/ScriptCommands/DoEntity.vb @@ -105,6 +105,9 @@ Dim textureInformation() As String = textureData.Split(CChar(",")) ent.Textures(textureID) = TextureManager.GetTexture(textureInformation(0), New Rectangle(int(textureInformation(1)), int(textureInformation(2)), int(textureInformation(3)), int(textureInformation(4)))) + Case "setmodelpath" + ent.ModelPath = argument.GetSplit(1) + ent.Model = ModelManager.GetModel(ent.ModelPath) Case "addtoposition" Dim PositionList As List(Of String) = argument.Split(CChar(",")).ToList() Dim newPosition As Vector3 = New Vector3(sng(PositionList(1).Replace("~", CStr(ent.Position.X)).Replace(".", GameController.DecSeparator)), diff --git a/P3D/World/ActionScript/V2/ScriptLibrary.vb b/P3D/World/ActionScript/V2/ScriptLibrary.vb index 24948a334..19be4d9c2 100644 --- a/P3D/World/ActionScript/V2/ScriptLibrary.vb +++ b/P3D/World/ActionScript/V2/ScriptLibrary.vb @@ -246,6 +246,8 @@ Namespace ScriptVersion2 New ScriptArgument("additionalValue", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the AdditionalValue property of the selected entity.")) r(New ScriptCommand("entity", "setcollision", {New ScriptArgument("entityID", ScriptArgument.ArgumentTypes.Int), New ScriptArgument("collision", ScriptArgument.ArgumentTypes.Bool)}.ToList(), "Sets the Collision property of the selected entity.")) + r(New ScriptCommand("entity", "setmodelpath", {New ScriptArgument("entityID", ScriptArgument.ArgumentTypes.Int), + New ScriptArgument("ModelPath", ScriptArgument.ArgumentTypes.Str)}.ToList(), "Sets the ModelPath property of the selected entity.")) r(New ScriptCommand("entity", "settexture", {New ScriptArgument("entityID", ScriptArgument.ArgumentTypes.Int), New ScriptArgument("textureIndex", ScriptArgument.ArgumentTypes.Str), New ScriptArgument("textureName", ScriptArgument.ArgumentTypes.Str),