#(cooldino74) momentum script

193 messages · Page 1 of 1 (latest)

plain ridge
#

im using the latest denizen dev build, I have no idea why it isn't working

dark muskBOT
#

(cooldino74) .has_friction tag not working?

dark muskBOT
#

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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>

plain ridge
#

are the announcements in #changelog not released yet?

vocal deltaBOT
# plain ridge !checklog https://paste.denizenscript.com/View/106907
Server Version

Paper version git-Paper-372 (MC: 1.18.2)-- (Outdated build, behind by 16... Current build is 388)

Plugin Version(s)

Citizens: 2.0.30-SNAPSHOT (build 2954) -- (Current build :white_check_mark:)
Denizen: 1.2.6-SNAPSHOT (build 6695-DEV) -- (Current build :white_check_mark:)

Checked For

@plain ridge

Online/Offline

Offline, but proxied.

Java Version

17.0.1 :white_check_mark:

Other Noteworthy Plugin(s)

MythicMobs: 5.0.0-SNAPSHOT-5145f853

Possibly Relevant Plugin(s)

ViaVersion: 4.5.1 - Mixed client vs server versions can sometimes cause packet-related issues.
Multiverse-Core: 4.3.1-b861 - Multi-world configuration plugins may affect NPCs in unexpected ways.

Potentially Bad Line(s)

2ViaVersion: 4.5.1, 2Essentials: 2.19.0-dev+232-b84207f, 2MinehutPlugin: 1.0-SNAPSHOT, :warning: Free server providers cannot be properly supported. Refer to https://wiki.citizensnpcs.co/Frequently_Asked_Questions#I_have_a_free_server_.28Aternos.2C_Minehut.2C_....29_but_there.27s_problems.

plain ridge
#

ohh

astral coyoteBOT
#
Resolved

Thread closed as resolved.

plain ridge
#

okay, so im trying to make a momentum system where the player gains momentum when they sprint jump but they have a set limit to speed they cannot pass

#

the has friction tag is working now

#

but uh

#

huh??

bitter python
#

!> aint valid

plain ridge
#

o

#

im rusty

#

aa

thick bay
#

that's equivalent to <=

plain ridge
#

oh my god im stupid

#

why did I try to

#

wtf

plain ridge
#

for some reason <player.is_sprinting> isn't working in this event, so I tried context.state but I think that caused the while loop to fill with while true and now the player speed is constantly incrementing

#

any idea on how I can accomplish how to increase the player's speed when they are sprinting and set it to the default when they aren't?

#

(script and log with is_sprinting)

#

nevermind, ignore that, is_sprinting is working I just had to change it to after instead of on

#

also, can the thread title be changed to something along the lines of "momentum script"?

#

(cooldino74) momentum script

#

nevermind too lol

plain ridge
#

how do I make a player slide like they're on ice everywhere?

#

for some reason the has_friction mechanism just is not working

vocal deltaBOT
# plain ridge !checklog https://paste.denizenscript.com/View/106972
Server Version

Paper version git-Paper-431 (MC: 1.19.3)-- (Outdated build, behind by 12... Current build is 443)

Plugin Version(s)

Citizens: 2.0.30-SNAPSHOT (build 2954) -- (Outdated build, behind by 4)
Denizen: 1.2.6-SNAPSHOT (build 6695-DEV) -- (Outdated build, behind by 1)

Checked For

@plain ridge

Online/Offline

Offline, but proxied.

Java Version

17.0.1 :white_check_mark:

Other Noteworthy Plugin(s)

MythicMobs: 5.0.0-SNAPSHOT-5145f853

Possibly Relevant Plugin(s)

ViaVersion: 4.5.1 - Mixed client vs server versions can sometimes cause packet-related issues.
Multiverse-Core: 4.3.1-b861 - Multi-world configuration plugins may affect NPCs in unexpected ways.

Potentially Bad Line(s)

2SCore: 3.9.41, 2MinehutPlugin: 1.0-SNAPSHOT, 2Essentials: 2.19.0-dev+232-b84207f, :warning: Free server providers cannot be properly supported. Refer to https://wiki.citizensnpcs.co/Frequently_Asked_Questions#I_have_a_free_server_.28Aternos.2C_Minehut.2C_....29_but_there.27s_problems.

plain ridge
#

!update denizen citizens

vocal deltaBOT
plain ridge
vocal deltaBOT
# plain ridge !checklog https://paste.denizenscript.com/View/106973
Server Version

Paper version git-Paper-431 (MC: 1.19.3)-- (Outdated build, behind by 12... Current build is 443)

Plugin Version(s)

Citizens: 2.0.30-SNAPSHOT (build 2958) -- (Current build :white_check_mark:)
Denizen: 1.2.6-SNAPSHOT (build 6696-DEV) -- (Current build :white_check_mark:)

Checked For

@plain ridge

Online/Offline

Offline, but proxied.

Java Version

17.0.1 :white_check_mark:

Other Noteworthy Plugin(s)

MythicMobs: 5.0.0-SNAPSHOT-5145f853

Possibly Relevant Plugin(s)

ViaVersion: 4.5.1 - Mixed client vs server versions can sometimes cause packet-related issues.
Multiverse-Core: 4.3.1-b861 - Multi-world configuration plugins may affect NPCs in unexpected ways.

Potentially Bad Line(s)

2SCore: 3.9.41, 2MinehutPlugin: 1.0-SNAPSHOT, 2Denizen: 1.2.6-SNAPSHOT (build 6696-DEV), :warning: Free server providers cannot be properly supported. Refer to https://wiki.citizensnpcs.co/Frequently_Asked_Questions#I_have_a_free_server_.28Aternos.2C_Minehut.2C_....29_but_there.27s_problems.

plain ridge
#

it doesnt work?

#

is it because the paper version is behind?

weak wind
#

have you tried it on any other entities? like a non-player one

plain ridge
#

no, not yet

weak wind
#

i was able to get it working with a pig, but I also don't see any effect when it's used on players

#

ah, that'd be it

#

it doesn't work with players

plain ridge
#

ohh

#

thank you so much!

weak wind
#

looks like a player riding a frictionless mob doesn't work either, like a frictionless horse

#

it'll slide around just not when mounted

plain ridge
#

any idea on how to recreate the effect?

weak wind
#

great question
not sure how one would do it efficiently but i guess you could do something like constantly adding velocity to the player in the direction they're facing
not sure how you'd keep it constant or change speeds

plain ridge
#

hmm

#

I just wanted the player to slow down when they turned too fast, and ice did that without me needing to do any math

#

!xyproblem myself aaa

vagrant light
#

i remember that this works if you mount a player to an amorstand with no friction

#

mergu did this

weak wind
#

monkey also suggested
can also disable gravity for the player and put em 0.01 above ground

plain ridge
#

hmm, the problem with that is that I can't make the player naturally jump/go down

#

I think ill figure that out later, as its sort of a minor inconvenience I could probably fix later on as I work out the fundamentals

#

right now, I want to make a custom jump system by adding only upwards velocity to the player without altering their existing velocity

#

this is what I have right now:

#

but uh

#

!t entitytag.velocity

vocal deltaBOT
thick bay
#

is actually just putting them on ice not a viable solution

plain ridge
#

maybe just

#

-showfake other blocks on ice

thick bay
#

idk if that'd work

#

ice works with less-than-half blocks on top of it, though

plain ridge
#

oh, I didnt know about that

#

yeah that would definitely work

#

yup! yeah ill just go with that tehn

#

thank you!

plain ridge
# vocal delta

back to this, it does not accurately calculate the player clientside movement velocity and doesn't update fast enough (I think?)

#

it's sort of delayed

ornate canyonBOT
plain ridge
#

facepalm it recorded the audio

#

im so sorry

unkempt needle
#

what is the actual like

#

end goal

#

you seem to have changed that several times

plain ridge
#

end goal is to make a functioning movement script that is fluid and balanced

#

should I open individual threads for problems?

#

i've seen people just put all their project problems in one thread, so I thought I would do the same

unkempt needle
#

a functioning movement script that is fluid and balanced is a meaningless goal sorry

#

what does it do

thick bay
unkempt needle
plain ridge
#

the player can accelerate and gain/maintain speed by doing various things like continously sprinting or jumping

#

I would like to expand it later to more advanced movements but to get the base established is my goal right now yeah

plain ridge
#

I had an image in my mind so it made sense to me so thats why I said that, but yeah I can see how that literally does not describe anything

thick bay
#

don't think ice physics really does that, no? Minecraft's momentum system is super basic

#

as in like, you can cap out the speed in 3 seconds by just sprint jumping forward

#

you'll probably need to do some custom logic to make it effective

#

should be super simple to do though

plain ridge
#

I would like to create a tag prototype gamemode, and this would be the backbone

#

it would make it a lot more interesting than "I see player, I chase player"

thick bay
#

yeah this entire thread has just kind of been a big xy situation

#

You almost definitely don't want frictionless movement if you want it to feel good

plain ridge
#

its not frictionless, I think the ice is actually pretty grippy

plain ridge
thick bay
#

Obviously it's up to you, but generally moving on ice is just annoying for players

#

i wouldn't do that for a gamemode specifically made for dynamic movement

plain ridge
#

the player doesn't slide around too much, and it easily fixes a balancing issue

#

in my opinion, its a win - win

#

it makes the movement more natural and fluid, like in reality where you don't immediately come to a halt when you stop running

plain ridge
#

sorry for the accidental ping

thick bay
#

there wasn't one lol

#

you disabled it

plain ridge
#

oh

#

I swear I saw blue, but anyways

thick bay
#

include more information about your end goal when you ask questions. Asking 'How can i make this specific mechanism work for me' or 'How can i simulate ice physics always' are answerable questions, but the answers might not actually help you. If you start by telling us that you're trying to make a custom movement system that allows players to build momentum by continuously sprinting or jumping, but lose it when turning quickly will help us give you effective advice

#

speaking of which

#

doesn't quickly turning disable sprint?

#

could be wrong

plain ridge
plain ridge
thick bay
#

narrate targets linked player by default

#

no need for that argument

#

anyway

plain ridge
thick bay
#

0.1 is basically nothing

#

I'd suggest actually multiplying their velocity by 1.1

#

i think that'd feel nice

plain ridge
plain ridge
#

I can't figure out how to get the player's velocity

#

accurately

#

!t entitytag.velocity

vocal deltaBOT
plain ridge
#

for example, if the player is already going at a speed, I don't want to any part of that, just boost them up

thick bay
#

oh

#

then what you're doing should work

#

just uhh

#

be super small

#

try making it 0.4 or something and it'll be noticable

#

is there some other problem you're encountering

plain ridge
#

yup

plain ridge
#

please mute it

#

the velocity tag isn’t updating fast enough I think

#

if you jump, then turn 180 degrees, then jump again, it will actually push you backwards

thick bay
#

you don't jump in that video lol

plain ridge
#

oh, wait

plain ridge
thick bay
#

because you're using last tick's velocity

#

change it to on

plain ridge
#

ohhhh

#

I forgot to remove that after the last method required it

plain ridge
#

I thought it was because the tag wasn't updating fast enough but even with on tick it doesn't functionhttps://paste.denizenscript.com/View/107054

#

I don't know if the tag is malfunctioning, or i'm applying velocity in the wrong way

#

!t entitytag.velocity

vocal deltaBOT
thick bay
#

other solution is to do some math

#

on jump, take location

#

one tick later, get new location

#

subtract the two

#

you have a velocity vector

#

normalize, multiply, and add

plain ridge
#

that worked! i'm really happy with the result, thank you again

astral coyoteBOT
#
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.)

#

@plain ridge