How to give player control of a separate entity

Started by Memeslayer06 on Fri, 08/21/2020 - 21:19

Topic category: Help with modding (Java Edition)

Last seen on 03:41, 27. Sep 2020
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to give player control of a separate entity
Fri, 08/21/2020 - 21:19

is there was a way to give players control of a tamed pet. control meaning that wasd will move the pet and not the player, and the player will see through the animal's eyes

Last seen on 05:41, 22. Jun 2021
Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It's possible with MCreator,…
Sat, 08/22/2020 - 02:41

It's possible with MCreator, but it'd be much more flushed out if it were to be hard-coded. The easiest way to do this is to use the "on player tick" event to constantly teleport the pet to the player's position, and also make the player invisible. So in a sense, this allows the player to control the entity it wants to as long as you set custom procedures to only let it control specific animals and all that. But teleporting the entity to the player of the position each tick would most likely be the best way to go about this in MCreator.

Last seen on 03:41, 27. Sep 2020
Joined Aug 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
is there any way to do this…
Sat, 08/22/2020 - 03:59

is there any way to do this that the player doesn't move but the pet does?

Last seen on 17:49, 25. Mar 2021
Joined Jun 2016
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
You could save the original…
Sat, 08/22/2020 - 08:07

You could save the original position of the player so as soon as they decide to stop possessing the mob they will return to the original place