add WA.player.moveTo command to the readme
This commit is contained in:
parent
8f40e7a33c
commit
e70289c61d
@ -173,6 +173,19 @@ Example:
|
|||||||
WA.player.state.toto //will retrieve the variable
|
WA.player.state.toto //will retrieve the variable
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Move player to position
|
||||||
|
Player will try to find shortest path to the destination point and proceed to move there.
|
||||||
|
```typescript
|
||||||
|
// Let's move player to x: 250 y: 250 with speed of 10
|
||||||
|
WA.player.moveTo(250, 250, 10);
|
||||||
|
```
|
||||||
|
You can also chain movement like this:
|
||||||
|
```typescript
|
||||||
|
// Player will move to the next point after reaching first one
|
||||||
|
await WA.player.moveTo(250, 250, 10);
|
||||||
|
await WA.player.moveTo(500, 0, 10);
|
||||||
|
```
|
||||||
|
|
||||||
### Set the outline color of the player
|
### Set the outline color of the player
|
||||||
```
|
```
|
||||||
WA.player.setOutlineColor(red: number, green: number, blue: number): Promise<void>;
|
WA.player.setOutlineColor(red: number, green: number, blue: number): Promise<void>;
|
||||||
|
Loading…
Reference in New Issue
Block a user