Add @NPC.SetScale(npcID,X,Y,Z)
Works the same way as @Entity.SetScale()
This commit is contained in:
parent
3f6f8a57f2
commit
10cc749328
|
@ -104,6 +104,17 @@
|
|||
|
||||
targetNPC.MoveY = steps
|
||||
|
||||
IsReady = True
|
||||
Case "setscale"
|
||||
Dim targetNPC As NPC = Screen.Level.GetNPC(int(argument.GetSplit(0)))
|
||||
Dim ScaleData() As String = argument.Split(CChar(","))
|
||||
targetNPC.Scale = New Vector3(sng(ScaleData(1).Replace("~", CStr(targetNPC.Scale.X)).Replace(".", GameController.DecSeparator)),
|
||||
sng(ScaleData(2).Replace("~", CStr(targetNPC.Scale.Y)).Replace(".", GameController.DecSeparator)),
|
||||
sng(ScaleData(3).Replace("~", CStr(targetNPC.Scale.Z)).Replace(".", GameController.DecSeparator)))
|
||||
|
||||
If targetNPC.ModelPath <> "" Then
|
||||
targetNPC.Scale *= ModelManager.MODELSCALE
|
||||
End If
|
||||
IsReady = True
|
||||
Case "moveasync"
|
||||
Dim targetNPC As NPC = Screen.Level.GetNPC(int(argument.GetSplit(0)))
|
||||
|
|
|
@ -607,6 +607,10 @@ Namespace ScriptVersion2
|
|||
New ScriptArgument("Movement", ScriptArgument.ArgumentTypes.Str, {"Pokeball", "Still", "Looking", "FacePlayer", "Walk", "Straight", "Turning"}, True, "Still")}.ToList(), "Spawns a new NPC with the given conditions."))
|
||||
r(New ScriptCommand("npc", "setspeed", {New ScriptArgument("npcID", ScriptArgument.ArgumentTypes.Int),
|
||||
New ScriptArgument("speed", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Sets the speed of an NPC. The default is ""1""."))
|
||||
r(New ScriptCommand("npc", "setscale", {New ScriptArgument("npcID", ScriptArgument.ArgumentTypes.Int),
|
||||
New ScriptArgument("xS", ScriptArgument.ArgumentTypes.Sng),
|
||||
New ScriptArgument("yS", ScriptArgument.ArgumentTypes.Sng),
|
||||
New ScriptArgument("zS", ScriptArgument.ArgumentTypes.Sng)}.ToList(), "Changes the Scale property of the selected NPC."))
|
||||
|
||||
' Constructs:
|
||||
r(New ScriptCommand("npc", "position", "sngArr", {New ScriptArgument("npcID", ScriptArgument.ArgumentTypes.Int)}.ToList(), "Returns the position of the selected NPC.", ",", True))
|
||||
|
|
Loading…
Reference in New Issue