logo bannerlogo banner
Page Navigator

Example Usage

import LookAtDispatch from 'yolkbot/dispatches/LookAtDispatch';

bot.dispatch(new LookAtDispatch('0')); // a player's ID
bot.dispatch(new LookAtDispatch('1ust')); // a player's name

Arguments

  • target (string): This can either be an ingame username or an ingame player ID. Note that IDs take priority over usernames, so if you pass something like 5 and there is a player with the name 5, the bot will select the player with the ID 5 instead of the player with the name 5. IDs should be passed as strings.

Checks

  • The bot must be playing the game
  • The player passed must be a valid player in the game

Notes

The bot will calculate the yaw and pitch of a player and look at the player. Note that this is a snappy rotation and does not implement any kind of smoothing.