Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Help with monster chasing script URGENT PLEASE
- zackegh
- Scratcher
24 posts
Help with monster chasing script URGENT PLEASE
I have had this STUPID problem since I started making the monster where if the player is on the same x or y level as the monster, THE MONSTER KEEPS SHAKING!! ALL OF THE FIXES I'VE TRIED ENDS WITH THE MONSTER JUST STANDING STILL!!
I CAN'T TAKE THIS ANYMORE PLEASE JUST HELP ME
Here's the link
I CAN'T TAKE THIS ANYMORE PLEASE JUST HELP ME
Here's the link
- BladiPetrov
- Scratcher
100+ posts
Help with monster chasing script URGENT PLEASE
The shaking is because the X/Y distance is less than the speed of the monster, so it tries to go, for example, up. Now the monster is ABOVE the player, not in the same Y coordinate, so it tries to go down. Repeat process = shake
Scripts in forum helper and math and logic enjoyer
@greenFlag @delInput @addInput @turnLeft @turnRight @loopArrow :: #fdcfdc hat
About me
I have scratched for 7 years straight. No urge to do something to get popular. Friendly, I know Spanish (my native language) and English (and a bit of French). I like to program things I really like, not trends or things for contests.
EDIT: Yeah, I know it says I joined 4 years ago, but I scratched before going online.
- zackegh
- Scratcher
24 posts
Help with monster chasing script URGENT PLEASE
Sooo, what's the fix? (Sorry I'm dumb :p ) The shaking is because the X/Y distance is less than the speed of the monster, so it tries to go, for example, up. Now the monster is ABOVE the player, not in the same Y coordinate, so it tries to go down. Repeat process = shake
Last edited by zackegh (May 14, 2024 07:57:41)
- deck26
- Scratcher
1000+ posts
Help with monster chasing script URGENT PLEASE
Only move the monster if the difference between the monster x (or y, your description is unclear) and the player x is at least the distance you are going to move. That way you never overshoot.
- Discussion Forums
- » Help with Scripts
- » Help with monster chasing script URGENT PLEASE