#Supporting a player from afar

1 messages · Page 1 of 1 (latest)

reef forum
#

I want to recreate an item from a series where there was a club that could move players wherever it looked. I'll give you an image, although it doesn't have very good graphics.

#

Since I'm new to scripting, I can't think of anything to do so I just want you to tell me the necessary components.

wanton geyser
#

Get the normalised direction from getViewDirection();
Times this by the
distance you want the target player to be from the player holding the weapon
And then add it to the players pos.
Teleport the player to this pos

sage blaze
#

@reef forum

#

U mean u want to teleport the player in different directions ?

proud flax
#

This is the command staff in the avg series made by Alan Becker

#

The point is to control the player

#

Like to move them where you want

#

Basically like doing in a repeat, always active command block execute as @a[name='urName'] at @s run tp @a[r=9,name=!'urName'] ^^^7

#

Now this isn't exactly how it is in the series

#

As in the series it's an animation where as here it's a simulation

#

So selecting and throwing players isn't very easy

proud flax
#

Here are all the links for learning the basics

proud flax
#

#javascript #tutorial #course

⭐Time Stamps⭐
#1 00:00:00 JavaScript tutorial for beginners 🌐
#2 00:12:32 Variables 📦
#3 00:25:20 Arithmetic operators ➕
#4 00:33:47 Accept user input 💬
#5 00:39:09 Type conversion 💱
#6 00:44:48 Constants 🚫
#7 00:52:30 ⭐ Counter program 🔢
#8 01:01:46 Math object 🧮
#9 01:07:23 Random number genera...

▶ Play video

Landing page containing a high-level introduction of Script APIs for Minecraft: Bedrock Edition.