#(carlo7899) Manipulating Rotation

53 messages · Page 1 of 1 (latest)

knotty kindle
#

Hello, im new to denizen but know skript pretty well, im trying to simulate gun recoil, i thought the best way would be to manipulate the players pitch obviously, but in skript i only found that you could teleport the player to set his pitch (extremly buggy for my use case) or that you could manipulate some packets. Second option sounds promising but also hard to do since i know nothing about it. So i thought maybe theres an easier way using denizen.

short: can someone please tell me if there are ways to set a player's pitch using denizen without needing to teleport him?

random mothBOT
#

(carlo7899) Manipulating Rotation

random mothBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

split nest
#

!c look

gaunt berryBOT
# split nest !c look
Group

entity

Syntax

look (<entity>|...) [<location>/cancel/yaw:<yaw> pitch:<pitch>] (duration:<duration>) (offthread_repeat:<#>)

Short Description

Causes the NPC or other entity to look at a target location.

Description

Makes the entity look towards the location.

You can specify either a target location, or a yaw and pitch.

Can be used on players.

If a duration is set, the entity cannot look away from the location until the duration has expired.
Use the cancel argument to end the duration earlier.

Optionally, you can use the "offthread_repeat:" option alongside "yaw:" and "pitch:"
to cause a player's rotation to be smoothed out with a specified number of extra async rotation packets within a single tick.

thorn jacinth
#

use the offthread_repeat option there

#

makes it very smooth recoil

knotty kindle
#

i mean how to use the duration to make it smooth, i think the simple set pitch is possible for me to do

thorn jacinth
knotty kindle
#

@thorn jacinth just a little reminder

thorn jacinth
knotty kindle
#

alright thdx

knotty kindle
#

little reminder, btw imma head off till tmmr cya

knotty kindle
#

bump

#

@split nest could you maybe give me an example?

#

any

split nest
split nest
#

Does this give you an idea?

thorn jacinth
#

YEH

#

ITS THAT

#

SORRY

#

IVE BEEN BUSY

knotty kindle
#

thank you guys, this helps me. Do you guys know if its possible to connect this with skript? because all of my gun mechanics are using skript and they arent too basic, so i cant convert the whole thing into denizen script. I dont know any way to connect this with Skript myself

split nest
#

Most people here aren't really familiar with skript

#

There's probably some hacky way to connect the two, but if you want to use denizen I'd recommend writing your gun mechanics with it as well

knotty kindle
#

is it possible to make it change the players pitch if the item the player clicked with has a custom model id? cus this would work now that i think about it

autumn grotto
#

yeah, sure

#

!t itemtag.custom_model

gaunt berryBOT
autumn grotto
#

^ just check that

knotty kindle
#

how to trigger this when someone right clicks with a feather?

autumn grotto
#

!e right clicks block

gaunt berryBOT
#
Possible Confusion

Did you mean to search for player right clicks entity?

autumn grotto
#

!e clicks block

gaunt berryBOT
# autumn grotto !e clicks block
Group

Player

**WARNING**

this event may in some cases double-fire, requiring usage of the 'ratelimit' command (like 'ratelimit <player> 1t') to prevent doubling actions.

Event Lines

player (right|left) clicks <block>

Switches

with:<item> to only process the event if a specified item was held.
using:hand/off_hand/either_hand to only process the event if the specified hand was used to click.
type:<material> to only run if the block clicked matches the material input.

Triggers

when a player clicks on a block or in the air.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.item> returns the ItemTag the player is clicking with.
<context.location> returns the LocationTag the player is clicking on.
<context.relative> returns a LocationTag of the air block in front of the clicked block.
<context.click_type> returns an ElementTag of the Spigot API click type <@link url https://hub.spi...
<context.hand> returns an ElementTag of the used hand.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

knotty kindle
#

alright thx you

#

ill give it a rey

#

try*

thorn jacinth
#

maybe we'll see denizen-skript integration

#

or /featurethread it for depenizen 😭

#

you could probably hack it with execute

#

!c execute

gaunt berryBOT
# thorn jacinth !c execute
Group

server

Syntax

execute [as_player/as_op/as_npc/as_server] [<Bukkit-command>] (silent)

Short Description

Executes an arbitrary server command as if the player, NPC, or server typed it in.

Description

Allows the execution of server commands through a Denizen script.
Commands can be executed as the server, as an npc, as an opped player, or as a player, as though it was typed by the respective source.

Note that you should generally avoid using 'as_op', which is only meant for very specific special cases. 'as_server' is usually a better option.

Note: do not include the slash at the start. A slash at the start will be interpreted equivalent to typing two slashes at the front in-game.

Note that...

lost troutBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@knotty kindle