#recoil
1 messages · Page 1 of 1 (latest)
^ or pushing them backwards?
like this
So… yes, that
Set the player’s pitch i guess
Smaller the increments the smoother it will be
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?
Yes
Were you using the location function with the additional yaw/pitch?
Quite literally the line
Or you could use player’s loc offset by a vector
i dont know
Were you teleporting
not by much
by yes
oh
i get what you mean
yes i was using teleporting
location(x, y, z, world, yaw, pitch)
You can just set the pitch by itself
Thats the simplest
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
No, you dont need the location
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
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
tried like 10 and still nothing
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
i have like no clue how to use vectors
i only know how to use them with arrows and shit
Theres a tutorial on the minehut forums
Hopefully this will be a complete tutorial in vectors within vanilla Skript (might add onto this with Biosphere stuff) Terms you will learn (definitions of each one will be in the tutorial) : Pitch and yaw Vector Magnitude Normalization Location Velocity Basic arithmetic Dot product Cross product...
?
Then set {_}’s pitch to …, then teleport to loc ~ {_}
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
no errors but doesnt work
Need the yaw and pitch
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
try vector with yaw player's yaw and pitch player's pitch
^ gotta say “yaw” or “pitch” before the value
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
so kinda like
spawn {@projectile} at player ~ vector 0,1.6,0
but with the player
and teleporting
pretty much
though the vector you're offsetting it by isn't vector 0,1.6,0, but {_loc}
ye
which is usually why i name vectors {_v}
so they don't get mixed with actual locations
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
LOCATION (~ | offset by) VECTOR
So tp player to player’s location ~ vector(0, 10, 0) would tp 10 blocks up
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
You’re increasing the pitch after teleporting
ohhh
And dont need to tp the second time
Im not sure, but positive might be down, so you might want to make it - 10
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
still no errors and still not doing anything
just do it based on locations then
set {_loc}'s pitch to {_loc}'s pitch + 10
teleport player to {_loc}```
No need for ’s pitch
When you set {_pitch} youre just setting it to a number
So just set x to y
wdym
its anoyoing you cant just do
set {_pitch} to pitch of player
set player's pitch to {_pitch} + 10
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%"
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
Whats the code?
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%"
to keep the momentum ?
Yes
im so confused
how do u put momentum on the velocity
Set a local var to the velocity
Then set the velocity to the var (after the teleport)
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
If you want to know if something works you can https://tryitands.ee
But that might work
Make them look at the vector
Sheesh!
laggy but kinda works
might want to make it all faster
so theres less time to move your mouse around and glitch it
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%"
Whats with the left/right?
me moving my mouse
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
^ 20 times waiting one tick is a whole second
Should happen practically instantly
@rugged yew

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%"