Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » Bullet trajectories
- 20140069G
- Scratcher
22 posts
Bullet trajectories
So I made this project where its not a 2d game facing upwards, but sideways, what i mean by this is:
https://scratch.mit.edu/projects/693308387/
But a game like this:
https://imagetolink.com/ib/cYl1pM4nBg
So my doubt is how do i make the bullets face the mouse pointer and travelling to it, while going past the mouse cursor up until they reach the edge.
Right now the bullet is very weird and i need help fixing it, the following video will show how:
https://l1nq.com/fvDsS
Thanks for anyone helping me!
P.S: Sorry for using a shortened link, I know most people don't like to use them, but i had to use one otherwise scratch would censor it, if you want you can use those short url previewers so you know you are safe with this link.
https://scratch.mit.edu/projects/693308387/
But a game like this:
https://imagetolink.com/ib/cYl1pM4nBg
So my doubt is how do i make the bullets face the mouse pointer and travelling to it, while going past the mouse cursor up until they reach the edge.
Right now the bullet is very weird and i need help fixing it, the following video will show how:
https://l1nq.com/fvDsS
Thanks for anyone helping me!
P.S: Sorry for using a shortened link, I know most people don't like to use them, but i had to use one otherwise scratch would censor it, if you want you can use those short url previewers so you know you are safe with this link.
- Cool_Dude2022
- Scratcher
100+ posts
Bullet trajectories
So I made this project where its not a 2d game facing upwards, but sideways, what i mean by this is:
https://scratch.mit.edu/projects/693308387/
But a game like this:
https://imagetolink.com/ib/cYl1pM4nBg
So my doubt is how do i make the bullets face the mouse pointer and travelling to it, while going past the mouse cursor up until they reach the edge.
Right now the bullet is very weird and i need help fixing it, the following video will show how:
https://l1nq.com/fvDsS
Thanks for anyone helping me!
P.S: Sorry for using a shortened link, I know most people don't like to use them, but i had to use one otherwise scratch would censor it, if you want you can use those short url previewers so you know you are safe with this link.
Would this help?:
repeat until <touching [Edge v] ?>
if <touching [Mouse pointer v] ?> then
else
point towards [Mouse pointer v]
end
move (10) steps
end
Did I help you fix your problem? If so, please nominate my project to be featured!
If my code is used, credit is NOT required
- 20140069G
- Scratcher
22 posts
Bullet trajectories
Thanks, theres an issue tho, it will always follow the cursor, therefore it will not continue on its own and will follow the cursor forever, unless you put the cursor on the edge.
Nice idead though!
Nice idead though!
- Malicondi
- Scratcher
1000+ posts
Bullet trajectories
take the “point to mouse pointer” and out it at the start of the repeat loop, not inside and it should work. Thanks, theres an issue tho, it will always follow the cursor, therefore it will not continue on its own and will follow the cursor forever, unless you put the cursor on the edge.
Nice idead though!
post #1000 post #100 i help in the forums post #1 post #500 0 second ninja
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.
coming soon :)
I recommend reading jvvg's essay about the scratch team before complaining, as it may change your opinion and provide insight on the topic.
coming soon :)
- ramenecho
- Scratcher
100+ posts
Bullet trajectories
Ok, hello again, so im assuming you just want it to go in the direction of the cursor when launched but then just stop going towards the cursor, and just continue moving in the direction where the cursor was when it launched, like if you shot something in a fps game, the bullet just moves in the direction you were facing when it was launched. Try this Thanks, theres an issue tho, it will always follow the cursor, therefore it will not continue on its own and will follow the cursor forever, unless you put the cursor on the edge.
Nice idead though!
when I receive [Shoot Bullet v]This, in theory, should work. The receive block is just so you know when it should start at
point towards [Mouse pointer v]
repeat until <touching [edge v] ?>
move (2) steps
end
Happy to help, again
Hello there, this is a cool signature! You can even make your own wow! I really need somebody to check my game for bugs, MineQuest Idle its not the highest quality of games, but its an improvement from my previous ones
- 20140069G
- Scratcher
22 posts
Bullet trajectories
Thanks again, by the way even though the project you said was complicated, yours is still as good, dont give up and keep making more awesome games like mining idle!
- ramenecho
- Scratcher
100+ posts
Bullet trajectories
Happy to help! Yup! It worked! Thanks alot everyone!
Hello there, this is a cool signature! You can even make your own wow! I really need somebody to check my game for bugs, MineQuest Idle its not the highest quality of games, but its an improvement from my previous ones
- Discussion Forums
- » Help with Scripts
- » Bullet trajectories