Closed afkvido closed 2 years ago
Not ready quite yet, still needs to be a bit smoother.
How to make collision, divide the movement by (speed)/10, if it touches a wall, go back by (speed)/-7.5 . Using this method has worked for me a lot, also prodigy devs do be slacking tho edit: repeat the (speed)/10 10 times
But why would I want to make colliosons? I do like the phasing, I've found it quite useful.
For people who don't want to- well, phase through walls. Just make it a toggle, "Disable Collisions"
Bet, let's polish this. Anyways, any idea on how we're gonna add wall checks?
The same Prodigy does it. Just find whatever they check to ensure players don't noclip through walls and use that,.
Ok better description of the script I described,
Repeat 10 |change (x/y) by speed/10 |if touching wall then ||change (x/y) by speed/-7.5
The script could be done twice for both the x and y axis, or you could take the lazy route of putting them both in the same repeat (not reccomended).
Lmao idk if this is scratch code or something, but all I'm seeing is this: if touching wall
Alright, so how would we check that?
It is scratch code, but it is an idea of how to implement it
So... how are we going to check if touching wall?
resollves conflict by purging bundle lol
@afkvido try checking it by clicking ahead of where they're going to go, prodigy wont walk the player into the wall. if the event cancells then it's a wall and dont let them move
Alright, how would you simulate a click?
Take control of mouse for a split second and click there.
So we hijack the mouse, target it to the current location then the target location, and we click, if our pos doesn't change then we hit a wall?
Then we make that as a completley seperate hack, cuz current WASD works by editing player location variables directly.
Don't get your hopes up- I haven't actually implemented the click-to-move yet.
However, when one hack turns on, the other turns off, it's beautiful!
@Erisfiregamer1 @donaldli2020 Take a look at... https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent (PoinerEvent, not MouseEvent)
This pull request brings WASD movement into Prodigy Math.