#(cooldino74) momentum script
193 messages · Page 1 of 1 (latest)
(cooldino74) .has_friction tag not working?
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>
Content of Server Log Paste #106907: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/05 09:44:02 UTC-08:00, Paste length: 2693 characters across 33 lines, Content: Java Version: 17.0.1Up-time: 57s
Content of Denizen Script Paste #106908: Unnamed Denizen Script Paste... pasted 2023/03/05 09:47:46 UTC-08:00, Paste length: 293 characters across 8 lines, Content: momentum: type: world
are the announcements in #changelog not released yet?
Content of Server Log Paste #106907: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/05 09:44:02 UTC-08:00, Paste length: 2693 characters across 33 lines, Content: Java Version: 17.0.1Up-time: 57s
Paper version git-Paper-372 (MC: 1.18.2)-- (Outdated build, behind by 16... Current build is 388)
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:)
@plain ridge
Offline, but proxied.
17.0.1 :white_check_mark:
MythicMobs: 5.0.0-SNAPSHOT-5145f853
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.
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.
ohh
Thread closed as resolved.
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??
!> aint valid
that's equivalent to <=
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
Content of Denizen Script Paste #106942: Edit of paste 106908: Unnamed Denizen Script Paste... pasted 2023/03/05 13:45:23 UTC-08:00, Paste length: 512 characters across 13 lines, Content: momentum: type: world
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?
Content of Server Log Paste #106941: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/05 13:34:50 UTC-08:00, Paste length: 721947 characters across 9221 lines, Content: Java Version: 17.0.1Up-time: 1h 5m
(script and log with is_sprinting)
Content of Server Log Paste #106944: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/05 13:50:22 UTC-08:00, Paste length: 3738 characters across 41 lines, Content: Java Version: 17.0.1Up-time: 2m 43s
Content of Denizen Script Paste #106945: Unnamed Denizen Script Paste... pasted 2023/03/05 13:52:23 UTC-08:00, Paste length: 514 characters across 13 lines, Content: momentum: type: world
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
how do I make a player slide like they're on ice everywhere?
for some reason the has_friction mechanism just is not working
Content of Server Log Paste #106972: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/06 15:22:26 UTC-08:00, Paste length: 7383 characters across 85 lines, Content: Java Version: 17.0.1Up-time: 1m 23s
Paper version git-Paper-431 (MC: 1.19.3)-- (Outdated build, behind by 12... Current build is 443)
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)
@plain ridge
Offline, but proxied.
17.0.1 :white_check_mark:
MythicMobs: 5.0.0-SNAPSHOT-5145f853
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.
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.
!update denizen citizens
Latest Denizen stable release builds are at https://ci.citizensnpcs.co/job/Denizen/. Most users should download the stable release build.
Latest Denizen dev builds are at https://ci.citizensnpcs.co/job/Denizen_Developmental/. Dev builds are for usually for test servers only.
Spigot resource page for Denizen is at https://www.spigotmc.org/resources/denizen.21039/ (do NOT download builds from Spigot).
Latest Citizens dev builds are at https://ci.citizensnpcs.co/job/Citizens2/.
Spigot releases of Citizens are available at https://www.spigotmc.org/resources/citizens.13811/.
Content of Server Log Paste #106973: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/06 15:32:35 UTC-08:00, Paste length: 25359 characters across 242 lines, Content: Java Version: 17.0.1Up-time: 3m 42s
Paper version git-Paper-431 (MC: 1.19.3)-- (Outdated build, behind by 12... Current build is 443)
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:)
@plain ridge
Offline, but proxied.
17.0.1 :white_check_mark:
MythicMobs: 5.0.0-SNAPSHOT-5145f853
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.
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.
have you tried it on any other entities? like a non-player one
no, not yet
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
looks like a player riding a frictionless mob doesn't work either, like a frictionless horse
it'll slide around just not when mounted
any idea on how to recreate the effect?
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
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
i remember that this works if you mount a player to an amorstand with no friction
mergu did this
monkey also suggested
can also disable gravity for the player and put em 0.01 above ground
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:
Content of Denizen Script Paste #107013: Unnamed Denizen Script Paste... pasted 2023/03/07 15:59:46 UTC-08:00, Paste length: 191 characters across 5 lines, Content: jumpity: type: world
but uh
!t entitytag.velocity
Returns the movement velocity of the entity.
Note: Does not accurately calculate player clientside movement velocity.
location
LocationTag
EntityTag.velocity
is actually just putting them on ice not a viable solution
I was thinking about that
maybe just
-showfake other blocks on ice
oh, I didnt know about that
yeah that would definitely work
yup! yeah ill just go with that tehn
thank you!
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
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
a functioning movement script that is fluid and balanced is a meaningless goal sorry
what does it do
this sounds like corporate buzzword talk lol
yeah exactly
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
I blame my subconsciousness lmao
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
I uhh
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
yeah this is what im trying to remedy
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"
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
its not frictionless, I think the ice is actually pretty grippy
this again
and yeah I think this would fix the problem
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
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
what should I do to fix this?
sorry for the accidental ping
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
nope, lol
I think the turning problem is fixed now though, and now I want to make players gain upwards momentum and speed when they jump
Content of Denizen Script Paste #107013: Unnamed Denizen Script Paste... pasted 2023/03/07 15:59:46 UTC-08:00, Paste length: 191 characters across 5 lines, Content: jumpity: type: world
oop
0.1 is basically nothing
I'd suggest actually multiplying their velocity by 1.1
i think that'd feel nice
oh, yeah you're right, but the player is still getting flung
how should I go about doing this?
I can't figure out how to get the player's velocity
accurately
!t entitytag.velocity
Returns the movement velocity of the entity.
Note: Does not accurately calculate player clientside movement velocity.
location
LocationTag
EntityTag.velocity
I assume because their velocity is also being applied by the x and z factors, which I would like to negate as well
for example, if the player is already going at a speed, I don't want to any part of that, just boost them up
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
yup
this
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
you don't jump in that video lol
oh, wait
this lol
just tested it, it still doesn't work
Content of Server Log Paste #107050: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/08 14:26:50 UTC-08:00, Paste length: 13198 characters across 103 lines, Content: Java Version: 17.0.1Up-time: 2m 34s
Content of Denizen Script Paste #107051: Unnamed Denizen Script Paste... pasted 2023/03/08 14:27:53 UTC-08:00, Paste length: 531 characters across 16 lines, Content: momentum: debug: false
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
Content of Denizen Script Paste #107054: Unnamed Denizen Script Paste... pasted 2023/03/08 14:34:15 UTC-08:00, Paste length: 660 characters across 19 lines, Content: momentum: debug: false
Content of Server Log Paste #107055: Denizen Debug Logs From A Minecraft Server... pasted 2023/03/08 14:34:44 UTC-08:00, Paste length: 74144 characters across 609 lines, Content: Java Version: 17.0.1Up-time: 10m
I don't know if the tag is malfunctioning, or i'm applying velocity in the wrong way
!t entitytag.velocity
Returns the movement velocity of the entity.
Note: Does not accurately calculate player clientside movement velocity.
location
LocationTag
EntityTag.velocity
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
that worked! i'm really happy with the result, thank you again
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