#recoil

1 messages · Page 1 of 1 (latest)

lyric yacht
#

do you mean making the player camera rotate upwards

rugged yew
#

^ or pushing them backwards?

rugged yew
#

So… yes, that

#

Set the player’s pitch i guess

#

Smaller the increments the smoother it will be

torn ether
#

ive tried changing the pitch but its realy laggy if you move around at the same time

#

is there a way you can just change the pitch not the location as well?

rugged yew
#

Yes

rugged yew
rugged yew
#

Or you could use player’s loc offset by a vector

rugged yew
#

What?

#

You dont know what you were doing?

torn ether
#

like

#

wdym by location function

rugged yew
#

Were you teleporting

torn ether
#

by yes

#

oh

#

i get what you mean

#

yes i was using teleporting

rugged yew
#

location(x, y, z, world, yaw, pitch)

#

You can just set the pitch by itself

#

Thats the simplest

torn ether
#

so like

#

location(world, yaw, {_pitch})

#
[x] Encountered an error when reloading handel.sk
[x] [19:26:44] [Server thread/INFO]: [Skript] Reloading handel.sk...
[x] [19:26:44] [Server thread/INFO]: Line 22: (server/combat/handel.sk)
[x] [19:26:44] [Server thread/INFO]:     Functions cannot be used here (or there is a problem with your arguments).
[x] [19:26:44] [Server thread/INFO]:     Line: location(world, yaw, {_pitch})
[x] [19:26:44] [Server thread/INFO]:
[x] Script reloaded with 1 errors
rugged yew
#

That’s literally the majority of it

#

Set the pitch to pitch + 1

#

Or whatever

#

You can also loop it to make it smooth/gradual

torn ether
#

did this but it didnt work

command /test:
    trigger:
        set the player's pitch to player's pitch + 1
#

no errors just didnt do anything

rugged yew
#

1 is one degree

#

So probably not noticeable

torn ether
#

tried like 10 and still nothing

rugged yew
#

Debug

#

Broadcast the pitch before and after

torn ether
rugged yew
#

Okay

#

Probably vectors then

#

Set a vector from the players yaw and pitch, then adjust the yaw and teleport the player to their location offset by the vector

torn ether
#

i only know how to use them with arrows and shit

rugged yew
#

Theres a tutorial on the minehut forums

torn ether
#

?

rugged yew
#

Basically just set {_} to vector from p’s yaw and p’s pitch

#

Yes that one

rugged yew
torn ether
#
command /test:
    trigger:
        broadcast player's pitch
        set {_loc} to vector from player's pitch
        set {_loc}'s pitch to player's pitch + 10
        teleport player to {_loc}
        broadcast player's pitch
torn ether
rugged yew
torn ether
#

tried that gave me this

#
[x] [19:48:58] [Server thread/INFO]: Line 31: (server/combat/handel.sk)
[x] [19:48:58] [Server thread/INFO]:     {_loc} can only be set to one object, not more
[x] [19:48:58] [Server thread/INFO]:     Line: set {_loc} to vector from player's yaw and player's pitch
lyric yacht
#

try vector with yaw player's yaw and pitch player's pitch

rugged yew
#

You forgot the yaw

rugged yew
torn ether
#
command /test:
    trigger:
        broadcast player's pitch
        set {_loc} to vector with yaw player's yaw and pitch player's pitch
        set {_loc}'s pitch to player's pitch + 10
        teleport player to {_loc}
        broadcast player's pitch
lyric yacht
#

a vector isn't a location

#

you need to offset a real location by the vector

torn ether
#

so kinda like

#

spawn {@projectile} at player ~ vector 0,1.6,0

#

but with the player

#

and teleporting

lyric yacht
#

pretty much

#

though the vector you're offsetting it by isn't vector 0,1.6,0, but {_loc}

torn ether
#

ye

lyric yacht
#

which is usually why i name vectors {_v}

#

so they don't get mixed with actual locations

rugged yew
#

The vector is just the direction

#

Think of it like a piece of paper with a line drawn on it

You can put it on your table, but it’s free to slide around and rotate

torn ether
#

wait

#

ok im confused

#

teleport player to ~ vector {_v}

#

that looks wrong

rugged yew
#

LOCATION (~ | offset by) VECTOR

#

So tp player to player’s location ~ vector(0, 10, 0) would tp 10 blocks up

torn ether
#

so would it be like

#

teleport player to player's location ~ vector {_v}

rugged yew
#

No need for the word vector

#

Just the variable

torn ether
#

oh k

#

no errors

#

just tps me foward

#
command /test:
    trigger:
        broadcast player's pitch
        set {_v} to vector with yaw player's yaw and pitch player's pitch
        teleport player to player's location ~ {_v}
        set {_v}'s pitch to player's pitch + 10
        teleport player to {_v}
        broadcast player's pitch
rugged yew
#

You’re increasing the pitch after teleporting

torn ether
#

ohhh

rugged yew
#

And dont need to tp the second time

#

Im not sure, but positive might be down, so you might want to make it - 10

torn ether
#

ye i forgot to remove the old one

#
command /test:
    trigger:
        broadcast player's pitch
        set {_pitch}'s pitch to player's pitch + 10
        set {_v} to vector with yaw player's yaw and pitch {_pitch}
        teleport player to player's location ~ {_v}
        broadcast player's pitch
torn ether
lyric yacht
#

just do it based on locations then

#
set {_loc}'s pitch to {_loc}'s pitch + 10
teleport player to {_loc}```
torn ether
#

works but if your moving it stops ur momentum

rugged yew
#

No need for ’s pitch

#

When you set {_pitch} youre just setting it to a number

#

So just set x to y

torn ether
#

wdym

#

its anoyoing you cant just do

        set {_pitch} to pitch of player
        set player's pitch to {_pitch} + 10
rugged yew
#

Literally just remove “‘s pitch”

torn ether
# rugged yew Literally just remove “‘s pitch”
command /test:
    trigger:
        broadcast "pitch - %player's pitch%"
        broadcast "loc - %player's location%"
        set {_pitch} to player's pitch + 10
        set {_v} to vector with yaw player's yaw and pitch {_pitch}
        teleport player to player's location ~ {_v}
        broadcast "pitch - %player's pitch%"
        broadcast "loc - %player's location%"
rugged yew
#

Hmm

#

Try set {_loc} to player’s loc set {_loc}’s pitch to x teleport p to {_loc}

#

If it still kills velocity you can set that too

torn ether
rugged yew
#

Whats the code?

torn ether
#
command /test:
    trigger:
        broadcast "pitch - %player's pitch%"
        broadcast "loc - %player's location%"


        set {_loc} to player's loc
        set {_loc}'s pitch to x
        teleport player to {_loc}


        broadcast "pitch - %player's pitch%"
        broadcast "loc - %player's location%"
rugged yew
torn ether
#

oh

#

stops ur momentum if moving

rugged yew
#

You can store the velocity in a local var

#

Then set it again i guess

torn ether
#

to keep the momentum ?

rugged yew
#

Yes

torn ether
#

im so confused

torn ether
rugged yew
#

Set a local var to the velocity

#

Then set the velocity to the var (after the teleport)

torn ether
#

so just set the location to the velocity

#

?

#

wait

torn ether
# rugged yew Set a local var to the velocity

could i do like


        set {_loc} to location of {_p}
        set {_loc} to location 1 meters infront of {_loc}
        make {_p} to face location 0.1 meters above{_loc} at head rotation speed 100 and max head pitch -8
rugged yew
#

But that might work

#

Make them look at the vector

torn ether
lyric yacht
#

Sheesh!

torn ether
#

laggy but kinda works

lyric yacht
#

might want to make it all faster

#

so theres less time to move your mouse around and glitch it

torn ether
# lyric yacht might want to make it all faster
command /test:
    trigger:
        broadcast "pitch - %player's pitch%"


        loop 20 times:
            
            set {_loc} to location of player
            set {_loc} to location 1 meters infront of {_loc}
            make player to face location 0.01 meters above {_loc} at head rotation speed 100
            wait 1 tick


        broadcast "pitch - %player's pitch%"
rugged yew
#

Whats with the left/right?

torn ether
rugged yew
#

Ah

#

Honestly just make p face vector from yaw p’s yaw and pitch (p’s pitch + n) would probably work

#

No need for the location stuff

rugged yew
#

Should happen practically instantly

torn ether
#

@rugged yew

rugged yew
torn ether
# rugged yew <:send_code:688375650582790339>
command /test:
    trigger:
        broadcast "pitch - %player's pitch%"


        loop 20 times:
            
            make player face vector from yaw player's yaw and pitch (player's pitch + 1)
            wait 1 tick


        broadcast "pitch - %player's pitch%"