Tile - YAnimators - Move To – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Ylands scripting navbox}}" to "{{Ylands editor navbox}}")
m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}")
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Image:Move object.png]]
<!---
*'''Animation''' script tile, which moves selected '''object''' to '''target''' position.
THIS PAGE WAS GENERATED AUTOMATICALLY; DO NOT EDIT IT, OTHERWISE YOUR CHANGES WILL BE LOST DURING FUTURE UPDATE.
*'''Object''' can be entity, group or game logic.
-->
*'''Time''' defines how many seconds should it take to perform the animation.
== Move To(Object, Position, Time, Smoothing) ==
*'''Speed''' opposite to time, defines how quickly should the animation be performed.
*'''Smoothing''' is a number 0-1.
**At 0, the movement is completely smooth with no acceleration.
**At 1, the speed peaks at the middle, accelerating from the start and slowing towards the end.


NOTE: Object needs to be set to '''Animated'''.
[[File:YlandsTile-598.png]]
 
<pre>static moveToTime(obj: YEntity | YLogic | YGroup, targetPosition: YVector3, time: number, smoothing: number): void;</pre>
=== Parameters ===
 
==== obj ====
 
Target object
 
==== targetPosition ====
 
Target position
 
==== time ====
 
Movement duration (seconds)
 
==== smoothing ====
 
Movement smoothing (0-1)
 
=== Availability ===
 
[[Ylands:Tile Availability - Server|Server]]
 
=== Description ===
 
Moves the animated '''object''' to the target '''position''' in specified '''time'''.
 
=== Notes ===
 
* '''Smoothing''' will smooth the start and end of the movement.
 
== Move To(Object, Position, Speed, Smoothing) ==
 
[[File:YlandsTile-599.png]]
 
<pre>static moveToSpeed(obj: YEntity | YLogic | YGroup, targetPosition: YVector3, speed: number, smoothing: number): void;</pre>
=== Parameters ===
 
==== obj ====
 
Target object
 
==== targetPosition ====
 
Target position
 
==== speed ====
 
Movement speed (m/s)
 
==== smoothing ====
 
Movement smoothing (0-1)
 
=== Availability ===
 
[[Ylands:Tile Availability - Server|Server]]
 
=== Description ===
 
Moves the animated '''object''' to the target '''position''' at specified '''speed'''.
 
=== Notes ===
 
* '''Smoothing''' will smooth the start and end of the movement.




----
----
{{Ylands editor navbox}}
{{Navbox/Ylands}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|14}}}}
{{DEFAULTSORT:{{#sub:{{PAGENAME}}|7}}}}


[[Category: Instructions]]
[[Category: Instructions]]
[[Category: Ylands 0.13]]

Latest revision as of 14:24, 24 November 2023

Move To(Object, Position, Time, Smoothing)

YlandsTile-598.png

static moveToTime(obj: YEntity | YLogic | YGroup, targetPosition: YVector3, time: number, smoothing: number): void;

Parameters

obj

Target object

targetPosition

Target position

time

Movement duration (seconds)

smoothing

Movement smoothing (0-1)

Availability

Server

Description

Moves the animated object to the target position in specified time.

Notes

  • Smoothing will smooth the start and end of the movement.

Move To(Object, Position, Speed, Smoothing)

YlandsTile-599.png

static moveToSpeed(obj: YEntity | YLogic | YGroup, targetPosition: YVector3, speed: number, smoothing: number): void;

Parameters

obj

Target object

targetPosition

Target position

speed

Movement speed (m/s)

smoothing

Movement smoothing (0-1)

Availability

Server

Description

Moves the animated object to the target position at specified speed.

Notes

  • Smoothing will smooth the start and end of the movement.